Skip to content

Commit c8cac67

Browse files
committed
Don't use UTF8f when all the arguments to UTF8fARG come from the same SV
Use SVf/SVfARG instead, or even simpler, croak_sv.
1 parent 211c07b commit c8cac67

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

regcomp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9982,8 +9982,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
99829982
RExC_utf8 = true;
99839983
}
99849984
/* diag_listed_as: Can't find Unicode property definition "%s" in regex; marked by <-- HERE in m/%s/ */
9985-
vFAIL2utf8f("%" UTF8f, UTF8fARG(SvUTF8(msg),
9986-
SvCUR(msg), SvPVX(msg)));
9985+
vFAIL2utf8f("%" SVf, SVfARG(msg));
99879986
}
99889987

99899988
assert(prop_definition || strings);
@@ -12529,8 +12528,7 @@ Perl_get_re_gclass_aux_data(pTHX_ const regexp *prog, const regnode* node, bool
1252912528
if (SvCUR(msg)) {
1253012529
assert(prop_definition == NULL);
1253112530

12532-
croak("%" UTF8f,
12533-
UTF8fARG(SvUTF8(msg), SvCUR(msg), SvPVX(msg)));
12531+
croak_sv(msg);
1253412532
}
1253512533

1253612534
if (invlist) {

0 commit comments

Comments
 (0)