diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-10 20:42:40 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-10 20:42:40 +0000 |
commit | 11b9c9ab23dee98050c094a6a3713808e3e180cf (patch) | |
tree | 26af37f6b40806cfedd24504ae354c5b90d4c471 /scope.c | |
parent | dda061f299f6b87abed2423b4de87ce8ef198c71 (diff) | |
download | perl-11b9c9ab23dee98050c094a6a3713808e3e180cf.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.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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: |