From f478a152c3d5384f11edf751ff2ce0dcae3ebde5 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Mon, 2 Aug 1999 11:56:14 +0000 Subject: [PATCH] Fix regclass utf8 hex ranges for quads. p4raw-id: //depot/cfgperl@3884 --- regcomp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/regcomp.c b/regcomp.c index 03e2c74..bdbd643 100644 --- a/regcomp.c +++ b/regcomp.c @@ -2835,7 +2835,11 @@ S_regclassutf8(pTHX) if (lastvalue > value) FAIL("invalid [] range in regexp"); if (!SIZE_ONLY) - Perl_sv_catpvf(aTHX_ listsv, "%04x\t%04x\n", lastvalue, value); +#ifdef UV_IS_QUAD + Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\t%04" PERL_PRIx64 "\n", (UV)lastvalue, (UV)value); +#else + Perl_sv_catpvf(aTHX_ listsv, "%04x\t%04x\n", lastvalue, value); +#endif lastvalue = value; range = 0; } @@ -2848,7 +2852,11 @@ S_regclassutf8(pTHX) continue; /* do it next time */ } if (!SIZE_ONLY) +#ifdef UV_IS_QUAD + Perl_sv_catpvf(aTHX_ listsv, "%04" PERL_PRIx64 "\n", (UV)value); +#else Perl_sv_catpvf(aTHX_ listsv, "%04x\n", value); +#endif } } -- 2.7.4