Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 12, 2024

While these "macros" work perfectly fine in confutils, it is somewhat strange to have these two there, while all others are in config.w32 files.

In particular, there is no need for a MODE_PHPIZE guard, since there are already config.w32 and config.w32.phpize.in.

However, we need to replace the semicolon the helptext, because the regex which parses ARG_(ENABLE|WITH) calls is restricted, and does not accept semicolons.


Note that I considered fixing the mentioned regex:

re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");

which doesn't do what it is supposed to do (the backslashes are consumed by the JScript string parser, so the parens are just grouping; a final semicolon is optional in JScript), but then saw https://github.com/php/pecl-console-termbox/blob/02a7c1c0a05614bd42e9d624aeda3be90d476f3a/config.w32, which works perfectly fine, although ARG_ENABLE() and ARG_WITH() are commented out. It would not work, though, if the comments were C-style comments.

While these "macros" work perfectly fine in confutils, it is somewhat
strange to have these two there, while all others are in config.w32
files.

In particular, there is no need for a `MODE_PHPIZE` guard, since there
are already config.w32 and config.w32.phpize.in.

However, we need to replace the semicolon the helptext, because the
regex which parses ARG_(ENABLE|WITH) calls is restricted, and does not
accept semicolons.
Copy link
Member

@petk petk left a comment

Choose a reason for hiding this comment

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

I think this is ok, yes.

@cmb69 cmb69 merged commit 9504fcf into php:master Oct 19, 2024
10 checks passed
@cmb69 cmb69 deleted the cmb/arg-enable-confutils branch October 19, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants