diff options
author | Adrian M. Enache <enache@rdslink.ro> | 2003-09-04 23:09:06 +0300 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-04 17:30:28 +0000 |
commit | 47682f07932a6dd9025c454470244440249a844b (patch) | |
tree | 53840dc834dd2571b18c9d1a8856b6f0e35e610d /ext | |
parent | 49d5cbad7e34aa93704ded3cb611586befa38496 (diff) | |
download | perl-47682f07932a6dd9025c454470244440249a844b.tar.gz |
Re: [PATCH] Re: ByteLoader and MSWin32
Message-ID: <20030904170906.GA1235@ratsnest.hole>
p4raw-id: //depot/perl@21032
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B/Bytecode.pm | 18 | ||||
-rw-r--r-- | ext/ByteLoader/bytecode.h | 2 | ||||
-rw-r--r-- | ext/ByteLoader/byterun.c | 2 |
3 files changed, 13 insertions, 9 deletions
diff --git a/ext/B/B/Bytecode.pm b/ext/B/B/Bytecode.pm index 8580885040..cce9948ee2 100644 --- a/ext/B/B/Bytecode.pm +++ b/ext/B/B/Bytecode.pm @@ -735,15 +735,17 @@ sub compile { } if ($scan) { my $f; - open $f, $scan - or bwarn("cannot rescan '$_'"), next; - while (<$f>) { - /^#\s*line\s+\d+\s+("?)(.*)\1/ and $files{$2} = 1; - /^#/ and next; - if (/\bgoto\b/ && !$keep_syn) { - bwarn "keeping the syntax tree: \"goto\" op found"; - keep_syn; + if (open $f, $scan) { + while (<$f>) { + /^#\s*line\s+\d+\s+("?)(.*)\1/ and $files{$2} = 1; + /^#/ and next; + if (/\bgoto\b\s*[^&]/ && !$keep_syn) { + bwarn "keeping the syntax tree: \"goto\" op found"; + keep_syn; + } } + } else { + bwarn "cannot rescan '$scan'"; } close $f; } diff --git a/ext/ByteLoader/bytecode.h b/ext/ByteLoader/bytecode.h index 667de7d979..0224625c20 100644 --- a/ext/ByteLoader/bytecode.h +++ b/ext/ByteLoader/bytecode.h @@ -215,6 +215,8 @@ typedef char *pvindex; return 0; \ } STMT_END +#define BSET_op_pmstashpv(op, arg) PmopSTASHPV_set(op, arg) + /* * stolen from toke.c: better if that was a function. * in toke.c there are also #ifdefs for dosish systems and i/o layers diff --git a/ext/ByteLoader/byterun.c b/ext/ByteLoader/byterun.c index c93b6cdeda..af55af6b75 100644 --- a/ext/ByteLoader/byterun.c +++ b/ext/ByteLoader/byterun.c @@ -817,7 +817,7 @@ byterun(pTHX_ register struct byteloader_state *bstate) { pvindex arg; BGET_pvindex(arg); - cPMOP->op_pmstashpv = arg; + BSET_op_pmstashpv(cPMOP, arg); break; } case INSN_OP_PMREPLROOTPO: /* 109 */ |