[asperl] various tweaks
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index 61bc731..0705922 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -120,7 +120,7 @@ free_tmps(void)
     }
 }
 
-static SV *
+STATIC SV *
 save_scalar_at(SV **sptr)
 {
     dTHR;
@@ -451,7 +451,11 @@ save_list(register SV **sarg, I32 maxsarg)
 }
 
 void
+#ifdef PERL_OBJECT
+save_destructor(void (*f) (void*, void*), void* p)
+#else
 save_destructor(void (*f) (void *), void *p)
+#endif
 {
     dTHR;
     SSCHECK(3);
@@ -687,7 +691,7 @@ leave_scope(I32 base)
            break;
        case SAVEt_DESTRUCTOR:
            ptr = SSPOPPTR;
-           (*SSPOPDPTR)(ptr);
+           (*SSPOPDPTR)(THIS_ ptr);
            break;
        case SAVEt_REGCONTEXT:
            {