pcre_cache_entry *pce;
int rv = -1;
zend_string *pattern;
- ALLOCA_FLAG(use_heap)
if (strchr(fmt, '%') == NULL)
return 0;
- ZSTR_ALLOCA_INIT(pattern, "~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, use_heap);
+ pattern = zend_string_init("~%[-0-9\\.]*s~", sizeof("~%[-0-9\\.]*s~") - 1, 0);
if ((pce = pcre_get_compiled_regex_cache_ex(pattern, 0)) == NULL) {
rv = -1;
} else {
php_pcre_free_match_data(match_data);
}
}
- ZSTR_ALLOCA_FREE(pattern, use_heap);
+ zend_string_release(pattern);
return rv;
}