File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ sub new {
175175 return 1;
176176 };
177177
178- $duk -> push_perl_function($self -> {call }, -1);
178+ $duk -> push_perl_function($self -> {call }, -1, 1 );
179179 $duk -> put_global_string(' perlCall' );
180180
181181 return $self ;
@@ -512,6 +512,8 @@ sub push_c_function {
512512 my $self = shift ;
513513 my $sub = shift ;
514514 my $nargs = shift || -1;
515+ my $nofinalizer = shift ;
516+
515517 $GlobalRef -> {" $sub " } = sub {
516518 my @args = @_ ;
517519 my $top = $self -> get_top();
@@ -546,6 +548,8 @@ sub push_c_function {
546548 };
547549
548550 $self -> perl_push_function($GlobalRef -> {" $sub " }, $nargs );
551+
552+ return if $nofinalizer ;
549553 $self -> eval_string(" (function(){perlFinalizer('$sub ')})" );
550554 $self -> set_finalizer(-2);
551555}
You can’t perform that action at this time.
0 commit comments