Fix regclass utf8 hex ranges for quads.
Jarkko Hietaniemi [Mon, 2 Aug 1999 11:56:14 +0000 (11:56 +0000)]
p4raw-id: //depot/cfgperl@3884

regcomp.c

index 03e2c74..bdbd643 100644 (file)
--- 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
        }
     }