summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2023-03-18 13:16:17 +0100
committerYves Orton <demerphq@gmail.com>2023-03-19 05:27:01 +0800
commitb3703faa10166966785f9e5de78ffc972823a979 (patch)
treef9d19a9cf24234d90809b5743e7f703b8b0a3a29 /proto.h
parent4d51d5bc07c99bc5811ccbae1503b27d813e0743 (diff)
downloadperl-b3703faa10166966785f9e5de78ffc972823a979.tar.gz
regexec.c - convert CAPTURE_CLEAR into an inline static function
This makes it easier to debug, and type checks parameters and the like. It does make it somewhat slower in debug mode, but so what.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index aeba4521fa..87ae9bde30 100644
--- a/proto.h
+++ b/proto.h
@@ -8905,6 +8905,11 @@ Perl_re_exec_indentf(pTHX_ const char *fmt, U32 depth, ...)
# endif /* defined(DEBUGGING) */
# if !defined(PERL_NO_INLINE_FUNCTIONS)
+PERL_STATIC_INLINE void
+S_capture_clear(pTHX_ regexp *rex, U16 from_ix, U16 to_ix, const char *str comma_pDEPTH);
+# define PERL_ARGS_ASSERT_CAPTURE_CLEAR \
+ assert(rex); assert(str)
+
PERL_STATIC_INLINE I32
S_foldEQ_latin1_s2_folded(pTHX_ const char *a, const char *b, I32 len);
# define PERL_ARGS_ASSERT_FOLDEQ_LATIN1_S2_FOLDED \