PCRE2Project / pcre2

PCRE2 development is now based here.
Other
917 stars 191 forks source link

Add PCRE2_EXTRA_NEVER_CALLOUT flag to pcre2.h.generic #510

Closed rrcgat closed 1 month ago

rrcgat commented 1 month ago

Hi everyone,

I noticed that the PCRE2_EXTRA_NEVER_CALLOUT flag is missing from pcre2.h.generic. This omission causes errors when using the latest master branch (currently https://github.com/PCRE2Project/pcre2/commit/8c84b4ba5865c1b46313c5cf6325dd28ffc3888a) in my Zig project. Here are the errors I encountered:

error: use of undeclared identifier 'PCRE2_EXTRA_NEVER_CALLOUT'
      if ((xoptions & PCRE2_EXTRA_NEVER_CALLOUT) != 0)
                      ^
error: use of undeclared identifier 'PCRE2_EXTRA_NEVER_CALLOUT'
    (ccontext->extra_options & ~PUBLIC_COMPILE_EXTRA_OPTIONS) != 0)
                                ^
note: expanded from macro 'PUBLIC_COMPILE_EXTRA_OPTIONS'
    PCRE2_EXTRA_NEVER_CALLOUT)

After adding PCRE2_EXTRA_NEVER_CALLOUT (copy from pcre2.h.in) to pcre2.h.generic, these errors were resolved.

Does this look good to you? Feel free to let me know if you need any further adjustments!

PhilipHazel commented 1 month ago

pcre2.h.generic is automatically generated when a release is built, which is why nobody thinks of updating it in between. But there is no harm in doing so, of course. I've just allowed the checks to run - when they have succeeded (surely they will?) the commit can happen.