This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Opcode.xs: fix compiler warning
authorDavid Mitchell <davem@iabyn.com>
Tue, 1 Dec 2020 11:07:59 +0000 (11:07 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 1 Dec 2020 11:07:59 +0000 (11:07 +0000)
In some debugging code it was doing a SAVEDESTRUCTOR()
to do a warn() on scope exit, but it should have used the nocontext
version of warn().

ext/Opcode/Opcode.pm
ext/Opcode/Opcode.xs

index 9351c3b..fd3fbee 100644 (file)
@@ -6,7 +6,7 @@ use strict;
 
 our($VERSION, @ISA, @EXPORT_OK);
 
-$VERSION = "1.48";
+$VERSION = "1.49";
 
 use Carp;
 use Exporter ();
index 121b14f..3fb1116 100644 (file)
@@ -237,7 +237,8 @@ opmask_addlocal(pTHX_ SV *opset, char *op_mask_buf) /* Localise PL_op_mask then
      * is disallowed by Borland
      */
     if (opcode_debug >= 2)
-       SAVEDESTRUCTOR((void(*)(void*))Perl_warn,"PL_op_mask restored");
+       SAVEDESTRUCTOR((void(*)(void*))Perl_warn_nocontext,
+            "PL_op_mask restored");
     PL_op_mask = &op_mask_buf[0];
     if (orig_op_mask)
        Copy(orig_op_mask, PL_op_mask, PL_maxo, char);