summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2016-10-19 22:54:15 +0200
committerYves Orton <demerphq@gmail.com>2016-10-19 22:54:15 +0200
commit85882954b1cf834f8dfcabb6b93d106d9ca02e62 (patch)
treea4a5065875aad037b3d4a8dc51df36ba714c20d5
parent2155384086267a57ee889c698fad3a1380105303 (diff)
downloadperl-85882954b1cf834f8dfcabb6b93d106d9ca02e62.tar.gz
make regen and args assert fix
-rw-r--r--embed.h8
-rw-r--r--proto.h12
-rw-r--r--regexec.c2
3 files changed, 12 insertions, 10 deletions
diff --git a/embed.h b/embed.h
index 0f1ae02fd2..1af29175cb 100644
--- a/embed.h
+++ b/embed.h
@@ -1136,15 +1136,15 @@
#define isSB(a,b,c,d,e,f) S_isSB(aTHX_ a,b,c,d,e,f)
#define isWB(a,b,c,d,e,f,g) S_isWB(aTHX_ a,b,c,d,e,f,g)
#define reg_check_named_buff_matched S_reg_check_named_buff_matched
-#define regcp_restore(a,b,c) S_regcp_restore(aTHX_ a,b,c _aDEPTH)
-#define regcppop(a,b) S_regcppop(aTHX_ a,b _aDEPTH)
-#define regcppush(a,b,c) S_regcppush(aTHX_ a,b,c _aDEPTH)
+#define regcp_restore(a,b,c) S_regcp_restore(aTHX_ a,b,c _aDEPTH)
+#define regcppop(a,b) S_regcppop(aTHX_ a,b _aDEPTH)
+#define regcppush(a,b,c) S_regcppush(aTHX_ a,b,c _aDEPTH)
#define reghop3 S_reghop3
#define reghop4 S_reghop4
#define reghopmaybe3 S_reghopmaybe3
#define reginclass(a,b,c,d,e) S_reginclass(aTHX_ a,b,c,d,e)
#define regmatch(a,b,c) S_regmatch(aTHX_ a,b,c)
-#define regrepeat(a,b,c,d,e) S_regrepeat(aTHX_ a,b,c,d,e _aDEPTH)
+#define regrepeat(a,b,c,d,e) S_regrepeat(aTHX_ a,b,c,d,e _aDEPTH)
#define regtry(a,b) S_regtry(aTHX_ a,b)
#define to_byte_substr(a) S_to_byte_substr(aTHX_ a)
#define to_utf8_substr(a) S_to_utf8_substr(aTHX_ a)
diff --git a/proto.h b/proto.h
index 139e80220a..ec870f73c0 100644
--- a/proto.h
+++ b/proto.h
@@ -5284,13 +5284,13 @@ STATIC I32 S_reg_check_named_buff_matched(const regexp *rex, const regnode *scan
#define PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED \
assert(rex); assert(scan)
-STATIC void S_regcp_restore(pTHX_ regexp *rex, I32 ix, U32 *maxopenparen_p _pDEPTH);
-#define PERL_ARGS_ASSERT_REGCP_RESTORE \
- assert(rex); assert(maxopenparen_p)
-STATIC void S_regcppop(pTHX_ regexp *rex, U32 *maxopenparen_p _pDEPTH);
+STATIC void S_regcp_restore(pTHX_ regexp *rex, I32 ix, U32 *maxopenparen_p _pDEPTH);
+#define PERL_ARGS_ASSERT_REGCP_RESTORE \
+ assert(rex); assert(maxopenparen_p)
+STATIC void S_regcppop(pTHX_ regexp *rex, U32 *maxopenparen_p _pDEPTH);
#define PERL_ARGS_ASSERT_REGCPPOP \
assert(rex); assert(maxopenparen_p)
-STATIC CHECKPOINT S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxopenparen _pDEPTH);
+STATIC CHECKPOINT S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxopenparen _pDEPTH);
#define PERL_ARGS_ASSERT_REGCPPUSH \
assert(rex)
STATIC U8* S_reghop3(U8 *s, SSize_t off, const U8 *lim)
@@ -5318,7 +5318,7 @@ STATIC SSize_t S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode
#define PERL_ARGS_ASSERT_REGMATCH \
assert(reginfo); assert(startpos); assert(prog)
-STATIC I32 S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, regmatch_info *const reginfo, I32 max _pDEPTH)
+STATIC I32 S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, regmatch_info *const reginfo, I32 max _pDEPTH)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_REGREPEAT \
assert(prog); assert(startposp); assert(p); assert(reginfo)
diff --git a/regexec.c b/regexec.c
index 0cbe8899a5..1d8e33a2ba 100644
--- a/regexec.c
+++ b/regexec.c
@@ -435,6 +435,8 @@ STATIC void
S_regcp_restore(pTHX_ regexp *rex, I32 ix, U32 *maxopenparen_p _pDEPTH)
{
I32 tmpix = PL_savestack_ix;
+ PERL_ARGS_ASSERT_REGCP_RESTORE;
+
PL_savestack_ix = ix;
regcppop(rex, maxopenparen_p);
PL_savestack_ix = tmpix;