diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-02-29 18:15:09 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-02-29 18:15:09 +0000 |
commit | 470c347452fb266b7c1193e6adcb1f6faf973d67 (patch) | |
tree | fa6a858133f2679d92fd5618bcd8bdc50bb13e5b /regcomp.c | |
parent | 49acb6c86ad2e0478eebe0cafad30e7a4989e180 (diff) | |
download | perl-470c347452fb266b7c1193e6adcb1f6faf973d67.tar.gz |
Some compilers have problems with quad switch() controls.
p4raw-id: //depot/cfgperl@5366
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2867,7 +2867,7 @@ STATIC regnode * S_regclass(pTHX) { dTHR; - register UV value; + register U32 value; register I32 lastvalue = OOB_CHAR8; register I32 range = 0; register regnode *ret; @@ -2911,6 +2911,8 @@ S_regclass(pTHX) namedclass = regpposixcc(value); else if (value == '\\') { value = UCHARAT(PL_regcomp_parse++); + /* Some compilers cannot handle switching on 64-bit integer + * values, therefore value cannot be an UV. --jhi */ switch (value) { case 'w': namedclass = ANYOF_ALNUM; break; case 'W': namedclass = ANYOF_NALNUM; break; @@ -3312,7 +3314,7 @@ S_regclassutf8(pTHX) { dTHR; register char *e; - register UV value; + register U32 value; register U32 lastvalue = OOB_UTF8; register I32 range = 0; register regnode *ret; @@ -3353,8 +3355,11 @@ S_regclassutf8(pTHX) if (value == '[') namedclass = regpposixcc(value); else if (value == '\\') { - value = utf8_to_uv((U8*)PL_regcomp_parse, &numlen); + value = (U32)utf8_to_uv((U8*)PL_regcomp_parse, &numlen); PL_regcomp_parse += numlen; + /* Some compilers cannot handle switching on 64-bit integer + * values, therefore value cannot be an UV. Yes, this will + * be a problem later if we want switch on Unicode. --jhi */ switch (value) { case 'w': namedclass = ANYOF_ALNUM; break; case 'W': namedclass = ANYOF_NALNUM; break; |