summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index dba8bfb15a..b3c31b753d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -6230,14 +6230,15 @@ Perl_save_re_context(pTHX)
if (rx) {
U32 i;
for (i = 1; i <= rx->nparens; i++) {
- GV *gv;
char digits[TYPE_CHARS(long)];
const STRLEN len = my_sprintf(digits, "%lu", (long)i);
GV *const *const gvp
= (GV**)hv_fetch(PL_defstash, digits, len, 0);
- if (gvp && SvTYPE(gv = *gvp) == SVt_PVGV && GvSV(gv)) {
- save_scalar(gv);
+ if (gvp) {
+ GV * const gv = *gvp;
+ if (SvTYPE(gv) == SVt_PVGV && GvSV(gv))
+ save_scalar(gv);
}
}
}