Skip to content

fix: add PCRE2 capability to standalone module #3377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: v2/master
Choose a base branch
from

Conversation

airween
Copy link
Member

@airween airween commented May 10, 2025

what

This PR adds PCRE2 related code to standalone module.

why

Previously if the user chose PCRE2 regex engine (with --with-pcre2 at build time), the standalone module did not handle that, and still wanted to be built with the old regex engine.

Furthermore, the modules make test workflow also uses standalone module too, and with PCRE2 the whole test case was broken. This patch fixes that too.

@airween airween requested review from theseion and fzipi May 10, 2025 09:48

pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub);
preg->re_nsub = nsub;
#endif // end of WITH_PCRE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif // end of WITH_PCRE
#endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing this comment, I should add a new comment to line 94:

#else // otherwise use PCRE

#ifdef PCRE_ERROR_BADUTF8_OFFSET
case PCRE_ERROR_BADUTF8_OFFSET: return AP_REG_INVARG;
#endif
#endif // end of WITH_PCRE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif // end of WITH_PCRE
#endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as here.

@airween airween requested a review from theseion May 10, 2025 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants