summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic/funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fileinfo/libmagic/funcs.c')
-rw-r--r--ext/fileinfo/libmagic/funcs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/fileinfo/libmagic/funcs.c b/ext/fileinfo/libmagic/funcs.c
index c7d9a7e4f1..81c5faaafb 100644
--- a/ext/fileinfo/libmagic/funcs.c
+++ b/ext/fileinfo/libmagic/funcs.c
@@ -221,8 +221,7 @@ file_buffer(struct magic_set *ms, php_stream *stream, const char *inname, const
/* Check if we have a CDF file */
if ((ms->flags & MAGIC_NO_CHECK_CDF) == 0) {
php_socket_t fd;
- TSRMLS_FETCH();
- if (stream && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **)&fd, 0)) {
+ if (stream && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **)&fd, 0)) {
if ((m = file_trycdf(ms, fd, ubuf, nb)) != 0) {
if ((ms->flags & MAGIC_DEBUG) != 0)
(void)fprintf(stderr, "cdf %d\n", m);
@@ -445,13 +444,12 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
zend_string *res;
zval repl;
int rep_cnt = 0;
- TSRMLS_FETCH();
(void)setlocale(LC_CTYPE, "C");
opts |= PCRE_MULTILINE;
convert_libmagic_pattern(&patt, pat, strlen(pat), opts);
- if ((pce = pcre_get_compiled_regex_cache(Z_STR(patt) TSRMLS_CC)) == NULL) {
+ if ((pce = pcre_get_compiled_regex_cache(Z_STR(patt))) == NULL) {
zval_ptr_dtor(&patt);
rep_cnt = -1;
goto out;
@@ -459,7 +457,7 @@ file_replace(struct magic_set *ms, const char *pat, const char *rep)
zval_ptr_dtor(&patt);
ZVAL_STRING(&repl, rep);
- res = php_pcre_replace_impl(pce, ms->o.buf, strlen(ms->o.buf), &repl, 0, -1, &rep_cnt TSRMLS_CC);
+ res = php_pcre_replace_impl(pce, ms->o.buf, strlen(ms->o.buf), &repl, 0, -1, &rep_cnt);
zval_ptr_dtor(&repl);
if (NULL == res) {