From: Rafael Garcia-Suarez Date: Thu, 7 Sep 2006 09:49:31 +0000 (+0000) Subject: Invalidate ISA and method caches when calling a safe compartment X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4eb3f1b8e609839c557fabf2ba7f665d22a6a6be;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Opcode/Makefile.PL b/ext/Opcode/Makefile.PL index d7e781f..890832a 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 225fda9..2404dca 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 86135e0..eba1c86 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*/