This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Invalidate ISA and method caches when calling a safe compartment
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 7 Sep 2006 09:49:31 +0000 (09:49 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 7 Sep 2006 09:49:31 +0000 (09:49 +0000)
(bug #39887)

Remove XS_VERSION, make it equal to VERSION

p4raw-id: //depot/perl@28797

ext/Opcode/Makefile.PL
ext/Opcode/Opcode.pm
ext/Opcode/Opcode.xs

index d7e781f..890832a 100644 (file)
@@ -3,5 +3,4 @@ WriteMakefile(
     NAME => 'Opcode',
     MAN3PODS   => {},
     VERSION_FROM => 'Opcode.pm',
-    XS_VERSION => '1.03'
 );
index 225fda9..2404dca 100644 (file)
@@ -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();
 
index 86135e0..eba1c86 100644 (file)
@@ -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*/