From: Nicholas Clark Date: Thu, 15 Dec 2005 16:24:21 +0000 (+0000) Subject: In Perl_apply, the name of the op can be found from PL_op_name, instead X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4634a855caf7cb9c97bd7d7c7bdb72d61fd2e9c0;p=p5sagit%2Fp5-mst-13.2.git In Perl_apply, the name of the op can be found from PL_op_name, instead of using local string constants. p4raw-id: //depot/perl@26369 --- diff --git a/doio.c b/doio.c index 69aa4c2..3445937 100644 --- a/doio.c +++ b/doio.c @@ -1565,7 +1565,7 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) { register I32 val; register I32 tot = 0; - const char *what; + const char *const what = PL_op_name[type]; const char *s; SV ** const oldmark = mark; @@ -1574,11 +1574,11 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) platforms where kill was not defined. */ #ifndef HAS_KILL if (type == OP_KILL) - Perl_die(aTHX_ PL_no_func, "kill"); + Perl_die(aTHX_ PL_no_func, what); #endif #ifndef HAS_CHOWN if (type == OP_CHOWN) - Perl_die(aTHX_ PL_no_func, "chown"); + Perl_die(aTHX_ PL_no_func, what); #endif @@ -1599,7 +1599,6 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) } switch (type) { case OP_CHMOD: - what = "chmod"; APPLY_TAINT_PROPER(); if (++mark <= sp) { val = SvIVx(*mark); @@ -1638,7 +1637,6 @@ Perl_apply(pTHX_ I32 type, register SV **mark, register SV **sp) break; #ifdef HAS_CHOWN case OP_CHOWN: - what = "chown"; APPLY_TAINT_PROPER(); if (sp - mark > 2) { register I32 val2; @@ -1686,7 +1684,6 @@ nothing in the core. */ #ifdef HAS_KILL case OP_KILL: - what = "kill"; APPLY_TAINT_PROPER(); if (mark == sp) break; @@ -1756,7 +1753,6 @@ nothing in the core. break; #endif case OP_UNLINK: - what = "unlink"; APPLY_TAINT_PROPER(); tot = sp - mark; while (++mark <= sp) { @@ -1778,7 +1774,6 @@ nothing in the core. break; #if defined(HAS_UTIME) || defined(HAS_FUTIMES) case OP_UTIME: - what = "utime"; APPLY_TAINT_PROPER(); if (sp - mark > 2) { #if defined(HAS_FUTIMES)