1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
From 79c9c119a1ba3cb7f0ebd3cffb6011fb09415404 Mon Sep 17 00:00:00 2001
From: Florian Engelhardt <florian.engelhardt@oxid-esales.com>
Date: Fri, 8 Nov 2019 14:01:35 +0100
Subject: [PATCH] Remove all TSRMLS for PHP8 support
---
inotify.c | 20 ++++++++++----------
php_inotify.h | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/inotify.c b/inotify.c
index 94b8fbb..b3a0475 100644
--- a/inotify.c
+++ b/inotify.c
@@ -149,14 +149,14 @@ PHP_MINFO_FUNCTION(inotify)
}
/* }}} */
-static int php_inotify_queue_len(const int fd TSRMLS_DC) /* {{{ */
+static int php_inotify_queue_len(const int fd) /* {{{ */
{
int ret;
int queue_len;
ret = ioctl(fd, FIONREAD, &queue_len);
if (ret < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
return 0;
}
return queue_len;
@@ -199,11 +199,11 @@ PHP_FUNCTION(inotify_add_watch)
long mask, wd;
int fd;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsl", &zstream, &pathname, &pathname_len, &mask) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsl", &zstream, &pathname, &pathname_len, &mask) == FAILURE) {
return;
}
- if (php_check_open_basedir(pathname TSRMLS_CC)) {
+ if (php_check_open_basedir(pathname)) {
RETURN_FALSE;
}
@@ -237,7 +237,7 @@ PHP_FUNCTION(inotify_rm_watch)
int fd;
long wd;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &wd) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rl", &zstream, &wd) == FAILURE) {
return;
}
@@ -265,14 +265,14 @@ PHP_FUNCTION(inotify_queue_len)
int fd;
long queue_len;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstream) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
return;
}
php_stream_from_zval(stream, zstream);
INOTIFY_FD(stream, fd);
- queue_len = php_inotify_queue_len(fd TSRMLS_CC);
+ queue_len = php_inotify_queue_len(fd);
RETURN_LONG(queue_len);
}
@@ -291,14 +291,14 @@ PHP_FUNCTION(inotify_read)
zval event_ary;
int fd;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zstream) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zstream) == FAILURE) {
return;
}
php_stream_from_zval(stream, zstream);
INOTIFY_FD(stream, fd);
- readbuf_size = (double) php_inotify_queue_len(fd TSRMLS_CC) * 1.6;
+ readbuf_size = (double) php_inotify_queue_len(fd) * 1.6;
if (readbuf_size < 1) {
readbuf_size = sizeof(struct inotify_event) + 32;
}
@@ -315,7 +315,7 @@ PHP_FUNCTION(inotify_read)
continue;
} else if (readden < 0) {
if (errno != EAGAIN) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
}
efree(readbuf);
RETURN_FALSE;
diff --git a/php_inotify.h b/php_inotify.h
index 14bd478..bff8a65 100644
--- a/php_inotify.h
+++ b/php_inotify.h
@@ -73,11 +73,11 @@ PHP_FUNCTION(inotify_read);
#define INOTIFY_ERROR_CASE(func, errno) \
case (errno): \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, INOTIFY_##func##_##errno); \
+ php_error_docref(NULL, E_WARNING, INOTIFY_##func##_##errno); \
break;
#define INOTIFY_DEFAULT_ERROR(errno) \
default: \
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno)); \
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno)); \
break;
|