This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Doc & feature patch for Thread::Queue
[perl5.git] / scope.c
diff --git a/scope.c b/scope.c
index 4732fbe..7a0a578 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -152,7 +152,7 @@ free_tmps(void)
     }
 }
 
-static SV *
+STATIC SV *
 save_scalar_at(SV **sptr)
 {
     dTHR;
@@ -483,7 +483,11 @@ save_list(register SV **sarg, I32 maxsarg)
 }
 
 void
+#ifdef PERL_OBJECT
+save_destructor(DESTRUCTORFUNC f, void* p)
+#else
 save_destructor(void (*f) (void *), void *p)
+#endif
 {
     dTHR;
     SSCHECK(3);
@@ -747,7 +751,7 @@ leave_scope(I32 base)
            break;
        case SAVEt_DESTRUCTOR:
            ptr = SSPOPPTR;
-           (*SSPOPDPTR)(ptr);
+           (CALLDESTRUCTOR)(ptr);
            break;
        case SAVEt_REGCONTEXT:
            i = SSPOPINT;