Skip to content

Commit

Permalink
Invalidate ISA and method caches when calling a safe compartment
Browse files Browse the repository at this point in the history
(bug #39887)

Remove XS_VERSION, make it equal to VERSION

p4raw-id: //depot/perl@28797
  • Loading branch information
rgs committed Sep 7, 2006
1 parent 6295adb commit 4eb3f1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 0 additions & 1 deletion ext/Opcode/Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ WriteMakefile(
NAME => 'Opcode',
MAN3PODS => {},
VERSION_FROM => 'Opcode.pm',
XS_VERSION => '1.03'
);
7 changes: 3 additions & 4 deletions ext/Opcode/Opcode.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand All @@ -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();

Expand Down
4 changes: 4 additions & 0 deletions ext/Opcode/Opcode.xs
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down

0 comments on commit 4eb3f1b

Please sign in to comment.