diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-12-27 10:25:48 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-12-28 10:38:53 -0700 |
commit | f799ce5b1c4ca739689451f7214896b548302a75 (patch) | |
tree | 26c583be03c1270c9951bab54b4cc7405b1fd026 /proto.h | |
parent | 9f68b0f7acd1bcb04e7baa4bdb7cfec8e5d985c8 (diff) | |
download | perl-f799ce5b1c4ca739689451f7214896b548302a75.tar.gz |
regcomp.c: Don't iterate while changing an inversion list
This adds functions to prevent accidental (or deliberate) iteration over
an inversion list while it is being modified. This is to catch
development errors, and in production builds, the asserts() are likely
no-ops
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -6509,6 +6509,17 @@ PERL_STATIC_INLINE UV S_invlist_highest(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT_INVLIST_HIGHEST \ assert(invlist) +PERL_STATIC_INLINE bool S_invlist_is_iterating(pTHX_ SV* const invlist) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INVLIST_IS_ITERATING \ + assert(invlist) + +STATIC void S_invlist_iterfinish(pTHX_ SV* invlist) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INVLIST_ITERFINISH \ + assert(invlist) + PERL_STATIC_INLINE void S_invlist_iterinit(pTHX_ SV* invlist) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_INVLIST_ITERINIT \ |