diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-03 22:42:10 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-03 22:42:10 +0000 |
commit | 2de3dbccea8bcb1d17328cd596713c4aa8443082 (patch) | |
tree | 0427f163d9abc772fad3c27e4e138bea7797dc51 /pp.c | |
parent | 0e053d1e2a5de74963fa7472712777e316fe76f0 (diff) | |
download | perl-2de3dbccea8bcb1d17328cd596713c4aa8443082.tar.gz |
Integrate change #10412 from maintperl; locale is now
per-cop, not per-op; plus retweak the locale.t to always
list the skipped utf8 locales.
p4raw-link: @10412 on //depot/maint-5.6/perl: 71d0b827413df9e881d1c54d2d968823ed50c75b
p4raw-id: //depot/perl@10413
p4raw-edited: from //depot/maint-5.6/perl@10411 'edit in'
t/pragma/locale.t (@8600..)
p4raw-integrated: from //depot/maint-5.6/perl@10411 'merge in'
lib/locale.pm (@5902..) opcode.h pp.sym pp_proto.h (@8620..)
opcode.pl (@8998..) op.h perl.h (@9288..) pp_sys.c (@9524..)
util.c (@9538..) embed.h (@9584..) op.c (@9950..) pp.c
(@10091..) pp_ctl.c (@10100..)
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -1911,7 +1911,7 @@ PP(pp_slt) dSP; tryAMAGICbinSET(slt,0); { dPOPTOPssrl; - int cmp = ((PL_op->op_private & OPpLOCALE) + int cmp = (IN_LOCALE_RUNTIME ? sv_cmp_locale(left, right) : sv_cmp(left, right)); SETs(boolSV(cmp < 0)); @@ -1924,7 +1924,7 @@ PP(pp_sgt) dSP; tryAMAGICbinSET(sgt,0); { dPOPTOPssrl; - int cmp = ((PL_op->op_private & OPpLOCALE) + int cmp = (IN_LOCALE_RUNTIME ? sv_cmp_locale(left, right) : sv_cmp(left, right)); SETs(boolSV(cmp > 0)); @@ -1937,7 +1937,7 @@ PP(pp_sle) dSP; tryAMAGICbinSET(sle,0); { dPOPTOPssrl; - int cmp = ((PL_op->op_private & OPpLOCALE) + int cmp = (IN_LOCALE_RUNTIME ? sv_cmp_locale(left, right) : sv_cmp(left, right)); SETs(boolSV(cmp <= 0)); @@ -1950,7 +1950,7 @@ PP(pp_sge) dSP; tryAMAGICbinSET(sge,0); { dPOPTOPssrl; - int cmp = ((PL_op->op_private & OPpLOCALE) + int cmp = (IN_LOCALE_RUNTIME ? sv_cmp_locale(left, right) : sv_cmp(left, right)); SETs(boolSV(cmp >= 0)); @@ -1983,7 +1983,7 @@ PP(pp_scmp) dSP; dTARGET; tryAMAGICbin(scmp,0); { dPOPTOPssrl; - int cmp = ((PL_op->op_private & OPpLOCALE) + int cmp = (IN_LOCALE_RUNTIME ? sv_cmp_locale(left, right) : sv_cmp(left, right)); SETi( cmp ); @@ -3054,7 +3054,7 @@ PP(pp_ucfirst) U8 *tend; UV uv; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); uv = toTITLE_LC_uvchr(utf8n_to_uvchr(s, slen, &ulen, 0)); @@ -3086,7 +3086,7 @@ PP(pp_ucfirst) } s = (U8*)SvPV_force(sv, slen); if (*s) { - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); *s = toUPPER_LC(*s); @@ -3113,7 +3113,7 @@ PP(pp_lcfirst) U8 *tend; UV uv; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); uv = toLOWER_LC_uvchr(utf8n_to_uvchr(s, slen, &ulen, 0)); @@ -3145,7 +3145,7 @@ PP(pp_lcfirst) } s = (U8*)SvPV_force(sv, slen); if (*s) { - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); *s = toLOWER_LC(*s); @@ -3184,7 +3184,7 @@ PP(pp_uc) (void)SvPOK_only(TARG); d = (U8*)SvPVX(TARG); send = s + len; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(TARG); while (s < send) { @@ -3216,7 +3216,7 @@ PP(pp_uc) if (len) { register U8 *send = s + len; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); for (; s < send; s++) @@ -3258,7 +3258,7 @@ PP(pp_lc) (void)SvPOK_only(TARG); d = (U8*)SvPVX(TARG); send = s + len; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(TARG); while (s < send) { @@ -3291,7 +3291,7 @@ PP(pp_lc) if (len) { register U8 *send = s + len; - if (PL_op->op_private & OPpLOCALE) { + if (IN_LOCALE_RUNTIME) { TAINT; SvTAINTED_on(sv); for (; s < send; s++) |