summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
commitc76ac1ee16c5c9591d8ffad5a0651b7f81738b68 (patch)
tree26af37f6b40806cfedd24504ae354c5b90d4c471 /scope.c
parenta99ba4038e8029c0d033ef497d3a0f8653f0d570 (diff)
downloadperl-c76ac1ee16c5c9591d8ffad5a0651b7f81738b68.tar.gz
revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source
compatibility; introduce SAVEDESTRUCTOR_X() that accepts void(*)(pTHX_ void*) p4raw-id: //depot/perl@4339
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/scope.c b/scope.c
index 8952f43a59..9ee0429e02 100644
--- a/scope.c
+++ b/scope.c
@@ -541,7 +541,7 @@ Perl_save_list(pTHX_ register SV **sarg, I32 maxsarg)
}
void
-Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p)
+Perl_save_destructor(pTHX_ DESTRUCTORFUNC_NOCONTEXT_t f, void* p)
{
dTHR;
SSCHECK(3);
@@ -551,6 +551,16 @@ Perl_save_destructor(pTHX_ DESTRUCTORFUNC_t f, void* p)
}
void
+Perl_save_destructor_x(pTHX_ DESTRUCTORFUNC_t f, void* p)
+{
+ dTHR;
+ SSCHECK(3);
+ SSPUSHDXPTR(f);
+ SSPUSHPTR(p);
+ SSPUSHINT(SAVEt_DESTRUCTOR_X);
+}
+
+void
Perl_save_aelem(pTHX_ AV *av, I32 idx, SV **sptr)
{
dTHR;
@@ -831,7 +841,11 @@ Perl_leave_scope(pTHX_ I32 base)
break;
case SAVEt_DESTRUCTOR:
ptr = SSPOPPTR;
- CALLDESTRUCTOR(aTHXo_ ptr);
+ (*SSPOPDPTR)(ptr);
+ break;
+ case SAVEt_DESTRUCTOR_X:
+ ptr = SSPOPPTR;
+ (*SSPOPDXPTR)(aTHXo_ ptr);
break;
case SAVEt_REGCONTEXT:
case SAVEt_ALLOC: