summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjvoisin2017-10-11 20:40:35 +0200
committerjvoisin2017-10-11 20:40:35 +0200
commit17f59cf9689e4a0d5d3c020eeb9a78c03f62e858 (patch)
tree2508e6a200810ec2c16a087c89f953cf5a17968e /src
parent0422784f88f8d01926dc0451bef53fb067caccb3 (diff)
Add some more debug to the regexp thingy
Diffstat (limited to 'src')
-rw-r--r--src/sp_utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sp_utils.c b/src/sp_utils.c
index 58d367f..281b432 100644
--- a/src/sp_utils.c
+++ b/src/sp_utils.c
@@ -167,7 +167,7 @@ static char *zv_str_to_char(zval *zv) {
167 } 167 }
168 ret = estrdup(Z_STRVAL(copy)); 168 ret = estrdup(Z_STRVAL(copy));
169 // zend_string_release(str); 169 // zend_string_release(str);
170 return ret; 170 return ret;
171} 171}
172 172
173 173
@@ -360,7 +360,7 @@ zend_always_inline int is_regexp_matching(const pcre* regexp, const char* str) {
360 int ret = sp_pcre_exec(regexp, NULL, str, strlen(str), 0, 0, vec, sizeof(vec)); 360 int ret = sp_pcre_exec(regexp, NULL, str, strlen(str), 0, 0, vec, sizeof(vec));
361 if (ret < 0) { 361 if (ret < 0) {
362 if (ret != PCRE_ERROR_NOMATCH) { 362 if (ret != PCRE_ERROR_NOMATCH) {
363 sp_log_err("regexp", "Something went wrong with a regexp."); 363 sp_log_err("regexp", "Something went wrong with a regexp (%d).", ret);
364 } 364 }
365 return false; 365 return false;
366 } 366 }
@@ -382,7 +382,7 @@ int hook_function(const char* original_name, HashTable* hook_table,
382 return SUCCESS; 382 return SUCCESS;
383 } 383 }
384 } 384 }
385 385
386 if ((func = zend_hash_str_find_ptr(CG(function_table), 386 if ((func = zend_hash_str_find_ptr(CG(function_table),
387 VAR_AND_LEN(original_name)))) { 387 VAR_AND_LEN(original_name)))) {
388 if (func->handler == new_function) { 388 if (func->handler == new_function) {
@@ -397,7 +397,7 @@ int hook_function(const char* original_name, HashTable* hook_table,
397 func->handler = new_function; 397 func->handler = new_function;
398 } 398 }
399 } 399 }
400 400
401 if (0 == strncmp(original_name, "mb_", 3)) { 401 if (0 == strncmp(original_name, "mb_", 3)) {
402 CG(compiler_options) |= ZEND_COMPILE_NO_BUILTIN_STRLEN; 402 CG(compiler_options) |= ZEND_COMPILE_NO_BUILTIN_STRLEN;
403 if (zend_hash_str_find(ht, 403 if (zend_hash_str_find(ht,