summaryrefslogtreecommitdiff
path: root/opcode.pl
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker (via RT) <perlbug-followup@perl.org>2010-08-23 16:05:48 -0700
committerDavid Mitchell <davem@iabyn.com>2010-08-25 18:34:51 +0100
commitb0c6325e9e0a1de42f208a0e41705cc75eb71433 (patch)
tree6cb6e254febdbd69db058ce07d5b069c29c7c492 /opcode.pl
parent70a5eb4a0fb40c8d59c26043e7b9aa76f8ea2802 (diff)
downloadperl-b0c6325e9e0a1de42f208a0e41705cc75eb71433.tar.gz
Fix escaping in opcode.h generation
The op list has no escapes, so there's no need check for already-escaped characters, and the existing regex breaks any run of consecutive backslashes, escaped or not.
Diffstat (limited to 'opcode.pl')
-rwxr-xr-xopcode.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcode.pl b/opcode.pl
index 1dadb5358a..1b8c688c4d 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -209,7 +209,7 @@ for (@ops) {
my($safe_desc) = $desc{$_};
# Have to escape double quotes and escape characters.
- $safe_desc =~ s/(^|[^\\])([\\"])/$1\\$2/g;
+ $safe_desc =~ s/([\\"])/\\$1/g;
print qq(\t"$safe_desc",\n);
}