diff options
author | markm <markm@FreeBSD.org> | 2002-03-16 20:14:30 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-03-16 20:14:30 +0000 |
commit | b878a8b4fc512ca76116a7012802d385208857c3 (patch) | |
tree | 40ba760f36cd8e65b8c0a8caeaee00ceb84de622 /contrib/perl5/ext/Opcode | |
parent | 96faff292d8b1b0bfcebddfb2f70f375ad79fec7 (diff) | |
parent | 3eac21f49bc763a6c0044b4afbc0c7ece760144f (diff) | |
download | FreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.zip FreeBSD-src-b878a8b4fc512ca76116a7012802d385208857c3.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r92442,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/perl5/ext/Opcode')
-rw-r--r-- | contrib/perl5/ext/Opcode/Opcode.pm | 4 | ||||
-rw-r--r-- | contrib/perl5/ext/Opcode/Opcode.xs | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/contrib/perl5/ext/Opcode/Opcode.pm b/contrib/perl5/ext/Opcode/Opcode.pm index 9338d39..841120c 100644 --- a/contrib/perl5/ext/Opcode/Opcode.pm +++ b/contrib/perl5/ext/Opcode/Opcode.pm @@ -163,7 +163,7 @@ accumulated set of ops at that point. =item an operator set (opset) -An I<opset> as a binary string of approximately 43 bytes which holds a +An I<opset> as a binary string of approximately 44 bytes which holds a set or zero or more operators. The opset and opset_to_ops functions can be used to convert from @@ -185,7 +185,7 @@ tags and sets. All are available for export by the package. =item opcodes In a scalar context opcodes returns the number of opcodes in this -version of perl (around 340 for perl5.002). +version of perl (around 350 for perl-5.7.0). In a list context it returns a list of all the operator names. (Not yet implemented, use @names = opset_to_ops(full_opset).) diff --git a/contrib/perl5/ext/Opcode/Opcode.xs b/contrib/perl5/ext/Opcode/Opcode.xs index 581cbc9..cc4e1f4 100644 --- a/contrib/perl5/ext/Opcode/Opcode.xs +++ b/contrib/perl5/ext/Opcode/Opcode.xs @@ -250,7 +250,7 @@ PPCODE: save_aptr(&PL_endav); PL_endav = (AV*)sv_2mortal((SV*)newAV()); /* ignore END blocks for now */ - save_hptr(&PL_defstash); /* save current default stack */ + save_hptr(&PL_defstash); /* save current default stash */ /* the assignment to global defstash changes our sense of 'main' */ PL_defstash = gv_stashpv(Package, GV_ADDWARN); /* should exist already */ save_hptr(&PL_curstash); @@ -263,6 +263,11 @@ PPCODE: sv_free((SV*)GvHV(gv)); GvHV(gv) = (HV*)SvREFCNT_inc(PL_defstash); + /* %INC must be clean for use/require in compartment */ + save_hash(PL_incgv); + sv_free((SV*)GvHV(PL_incgv)); /* get rid of what save_hash gave us*/ + GvHV(PL_incgv) = (HV*)SvREFCNT_inc(GvHV(gv_HVadd(gv_fetchpv("INC",TRUE,SVt_PVHV)))); + PUSHMARK(SP); perl_call_sv(codesv, GIMME|G_EVAL|G_KEEPERR); /* use callers context */ SPAGAIN; /* for the PUTBACK added by xsubpp */ @@ -320,7 +325,7 @@ PPCODE: void opset(...) CODE: - int i, j; + int i; SV *bitspec, *opset; char *bitmap; STRLEN len, on; |