summaryrefslogtreecommitdiff
path: root/ext/Opcode
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-07 09:49:31 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-09-07 09:49:31 +0000
commit4eb3f1b8e609839c557fabf2ba7f665d22a6a6be (patch)
treea72a333e8a41dcaf24deead3d34ccf3017889bc3 /ext/Opcode
parent6295adb52568284405608d8c98e00b024ac4573a (diff)
downloadperl-4eb3f1b8e609839c557fabf2ba7f665d22a6a6be.tar.gz
Invalidate ISA and method caches when calling a safe compartment
(bug #39887) Remove XS_VERSION, make it equal to VERSION p4raw-id: //depot/perl@28797
Diffstat (limited to 'ext/Opcode')
-rw-r--r--ext/Opcode/Makefile.PL1
-rw-r--r--ext/Opcode/Opcode.pm7
-rw-r--r--ext/Opcode/Opcode.xs4
3 files changed, 7 insertions, 5 deletions
diff --git a/ext/Opcode/Makefile.PL b/ext/Opcode/Makefile.PL
index d7e781f21d..890832acec 100644
--- a/ext/Opcode/Makefile.PL
+++ b/ext/Opcode/Makefile.PL
@@ -3,5 +3,4 @@ WriteMakefile(
NAME => 'Opcode',
MAN3PODS => {},
VERSION_FROM => 'Opcode.pm',
- XS_VERSION => '1.03'
);
diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm
index 225fda9031..2404dcad45 100644
--- a/ext/Opcode/Opcode.pm
+++ b/ext/Opcode/Opcode.pm
@@ -4,10 +4,9 @@ use 5.006_001;
use strict;
-our($VERSION, $XS_VERSION, @ISA, @EXPORT_OK);
+our($VERSION, @ISA, @EXPORT_OK);
-$VERSION = "1.08";
-$XS_VERSION = "1.03";
+$VERSION = "1.09";
use Carp;
use Exporter ();
@@ -29,7 +28,7 @@ sub opset_to_hex ($);
sub opdump (;$);
use subs @EXPORT_OK;
-XSLoader::load 'Opcode', $XS_VERSION;
+XSLoader::load 'Opcode', $VERSION;
_init_optags();
diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs
index 86135e0d97..eba1c86d7d 100644
--- a/ext/Opcode/Opcode.xs
+++ b/ext/Opcode/Opcode.xs
@@ -314,6 +314,10 @@ PPCODE:
dummy_hv = save_hash(PL_incgv);
GvHV(PL_incgv) = (HV*)SvREFCNT_inc(GvHV(gv_HVadd(gv_fetchpv("INC",TRUE,SVt_PVHV))));
+ /* Invalidate ISA and method caches */
+ ++PL_sub_generation;
+ hv_clear(PL_stashcache);
+
PUSHMARK(SP);
perl_call_sv(codesv, GIMME|G_EVAL|G_KEEPERR); /* use callers context */
sv_free( (SV *) dummy_hv); /* get rid of what save_hash gave us*/