summaryrefslogtreecommitdiff
path: root/ext/fileinfo/libmagic/softmagic.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
committerAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
commitbdeb220f48825642f84cdbf3ff23a30613c92e86 (patch)
tree1a6cf34d20420e4815b4becb21311a4457d84103 /ext/fileinfo/libmagic/softmagic.c
parentbb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff)
downloadphp-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/fileinfo/libmagic/softmagic.c')
-rw-r--r--ext/fileinfo/libmagic/softmagic.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ext/fileinfo/libmagic/softmagic.c b/ext/fileinfo/libmagic/softmagic.c
index e626929c9e..727446b81a 100644
--- a/ext/fileinfo/libmagic/softmagic.c
+++ b/ext/fileinfo/libmagic/softmagic.c
@@ -360,14 +360,13 @@ check_fmt(struct magic_set *ms, struct magic *m)
int re_options, rv = -1;
pcre_extra *re_extra;
zend_string *pattern;
- TSRMLS_FETCH();
if (strchr(m->desc, '%') == NULL)
return 0;
(void)setlocale(LC_CTYPE, "C");
pattern = zend_string_init("~%[-0-9.]*s~", sizeof("~%[-0-9.]*s~") - 1, 0);
- if ((pce = pcre_get_compiled_regex(pattern, &re_extra, &re_options TSRMLS_CC)) == NULL) {
+ if ((pce = pcre_get_compiled_regex(pattern, &re_extra, &re_options)) == NULL) {
rv = -1;
} else {
rv = !pcre_exec(pce, re_extra, m->desc, strlen(m->desc), 0, re_options, NULL, 0);
@@ -2079,8 +2078,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
zval pattern;
int options = 0;
pcre_cache_entry *pce;
- TSRMLS_FETCH();
-
+
options |= PCRE_MULTILINE;
if (m->str_flags & STRING_IGNORE_CASE) {
@@ -2090,7 +2088,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
convert_libmagic_pattern(&pattern, (char *)m->value.s, m->vallen, options);
l = v = 0;
- if ((pce = pcre_get_compiled_regex_cache(Z_STR(pattern) TSRMLS_CC)) == NULL) {
+ if ((pce = pcre_get_compiled_regex_cache(Z_STR(pattern))) == NULL) {
zval_ptr_dtor(&pattern);
return -1;
} else {
@@ -2106,7 +2104,7 @@ magiccheck(struct magic_set *ms, struct magic *m)
haystack = estrndup(ms->search.s, ms->search.s_len);
/* match v = 0, no match v = 1 */
- php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 1, 1, PREG_OFFSET_CAPTURE, 0 TSRMLS_CC);
+ php_pcre_match_impl(pce, haystack, ms->search.s_len, &retval, &subpats, 1, 1, PREG_OFFSET_CAPTURE, 0);
/* Free haystack */
efree(haystack);