summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorChip Salzenberg <salzench@nielsenmedia.com>1997-08-07 00:00:00 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commitde939608bd9b236d9170fa8c2bcd0a8b397bba0a (patch)
tree01f4cfcb77108a712e2b132bec3b02b03924945b /op.c
parent72dbcb4b16ba8abae7db52f83482564e4d62acc4 (diff)
downloadperl-de939608bd9b236d9170fa8c2bcd0a8b397bba0a.tar.gz
Do not constant-fold ops that depend on locale if C<use locale>
p5p-msgid: 199707210519.BAA13785@nielsenmedia.com
Diffstat (limited to 'op.c')
-rw-r--r--op.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/op.c b/op.c
index d412bcf967..b8f363cb3a 100644
--- a/op.c
+++ b/op.c
@@ -1553,6 +1553,16 @@ register OP *o;
if (!(opargs[type] & OA_FOLDCONST))
goto nope;
+ switch (type) {
+ case OP_SPRINTF:
+ case OP_UCFIRST:
+ case OP_LCFIRST:
+ case OP_UC:
+ case OP_LC:
+ if (o->op_private & OPpLOCALE)
+ goto nope;
+ }
+
if (error_count)
goto nope; /* Don't try to run w/ errors */