From b3703faa10166966785f9e5de78ffc972823a979 Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Sat, 18 Mar 2023 13:16:17 +0100 Subject: 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. --- proto.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'proto.h') 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 \ -- cgit v1.2.1