Skip to content

Commit

Permalink
Fixed build with trunk(8.4)
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Jun 25, 2024
1 parent 8fc2849 commit b1d252c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion routes/yaf_route_regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,20 @@ static int yaf_route_regex_match(yaf_route_regex_object *regex, const char *uri,
#if PHP_VERSION_ID < 70400
php_pcre_match_impl(pce_regexp, (char*)uri, len, &matches, &subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
#else
#elif PHP_VERSION_ID < 80400
{
zend_string *tmp = zend_string_init(uri, len, 0);
php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
zend_string_release(tmp);
}
#else
{
zend_string *tmp = zend_string_init(uri, len, 0);
php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */,
0/* global */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
zend_string_release(tmp);
}
#endif

if (!zend_hash_num_elements(Z_ARRVAL(subparts))) {
Expand Down
9 changes: 8 additions & 1 deletion routes/yaf_route_rewrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,20 @@ static int yaf_route_rewrite_match(yaf_route_rewrite_object *rewrite, const char
#if PHP_VERSION_ID < 70400
php_pcre_match_impl(pce_regexp, (char*)uri, len, &matches, &subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
#else
#elif PHP_VERSION_ID <80400
{
zend_string *tmp = zend_string_init(uri, len, 0);
php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */,
0/* global */, 0/* ZEND_NUM_ARGS() >= 4 */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
zend_string_release(tmp);
}
#else
{
zend_string *tmp = zend_string_init(uri, len, 0);
php_pcre_match_impl(pce_regexp, tmp, &matches, &subparts /* subpats */,
0/* global */, 0/*flags PREG_OFFSET_CAPTURE*/, 0/* start_offset */);
zend_string_release(tmp);
}
#endif

if (!zend_hash_num_elements(Z_ARRVAL(subparts))) {
Expand Down

0 comments on commit b1d252c

Please sign in to comment.