]> git.vpit.fr Git - perl/modules/Scope-Upper.git/commitdiff
Fix building with SU_DEBUG defined on 5.8
authorVincent Pit <vince@profvince.com>
Thu, 14 Jan 2010 22:39:34 +0000 (23:39 +0100)
committerVincent Pit <vince@profvince.com>
Thu, 14 Jan 2010 22:39:34 +0000 (23:39 +0100)
Upper.xs

index 436a5b5f6c8ca35493384f9d17a1f933b36031b4..76be07a58d7fe1095abbe58662e90b031d914cbc 100644 (file)
--- a/Upper.xs
+++ b/Upper.xs
@@ -397,7 +397,8 @@ STATIC void su_localize(pTHX_ void *ud_) {
  }
 
  SU_D({
-  SV *z = newSV_type(t);
+  SV *z = newSV(0);
+  SvUPGRADE(z, t);
   PerlIO_printf(Perl_debug_log, "%p: === localize a %s at %d (save is %d)\n",
                                  ud, sv_reftype(z, 0),
                                      PL_scopestack_ix, PL_savestack_ix);