This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regexec.c: Add assertion check
authorKarl Williamson <public@khwilliamson.com>
Sat, 24 Sep 2011 21:42:14 +0000 (15:42 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sat, 1 Oct 2011 15:15:32 +0000 (09:15 -0600)
This makes sure before there is a segfault that the is_() functions
actually have the side effect that this expects.

regexec.c

index bdd5e3f..e6d3fa4 100644 (file)
--- a/regexec.c
+++ b/regexec.c
        bool ok; \
        ENTER; save_re_context(); \
        ok=CAT2(is_utf8_,class)((const U8*)str); \
-       assert(ok); LEAVE; } } STMT_END
+       assert(ok); assert(CAT2(PL_utf8_,class)); LEAVE; } } STMT_END
 
 /* Doesn't do an assert to verify that is correct */
 #define LOAD_UTF8_CHARCLASS_NO_CHECK(class) STMT_START { \