diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-03 11:26:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-04 22:45:31 -0800 |
commit | 5504e6cfd4036fd9f057da65d41cb31360de5221 (patch) | |
tree | 3130c7a619182026ea90c17464fc4928a7c664d8 /perly.y | |
parent | c25611d58839424e4723cc29fa005047f61b7d2b (diff) | |
download | perl-5504e6cfd4036fd9f057da65d41cb31360de5221.tar.gz |
Fix invalid token warning with PERL_XMLDUMP and label
Under mad builds, commit 5db1eb8 caused this warning:
$ PERL_XMLDUMP=/dev/null ./perl -Ilib -e 'foo:'
Invalid TOKEN object ignored at -e line 1.
Since I don’t understand the mad code so well, the easiest fix is to
revert back to using a PV, as we did before 5db1eb8. To record the
utf8ness, we sneak it behind the trailing null.
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -276,18 +276,18 @@ fullstmt: barestmt labfullstmt: LABEL barestmt { - $$ = newSTATEOP(SvUTF8(((SVOP*)$1)->op_sv), - savepv(SvPVX(((SVOP*)$1)->op_sv)), $2); + $$ = newSTATEOP(SVf_UTF8 + * PVAL($1)[strlen(PVAL($1))+1], + PVAL($1), $2); TOKEN_GETMAD($1, $2 ? cLISTOPx($$)->op_first : $$, 'L'); - op_free((OP*)$1); } | LABEL labfullstmt { - $$ = newSTATEOP(SvUTF8(((SVOP*)$1)->op_sv), - savepv(SvPVX(((SVOP*)$1)->op_sv)), $2); + $$ = newSTATEOP(SVf_UTF8 + * PVAL($1)[strlen(PVAL($1))+1], + PVAL($1), $2); TOKEN_GETMAD($1, cLISTOPx($$)->op_first, 'L'); - op_free((OP*)$1); } ; |