summaryrefslogtreecommitdiff
path: root/scope.h
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.h
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.h')
-rw-r--r--scope.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/scope.h b/scope.h
index c975cd188f..f481306564 100644
--- a/scope.h
+++ b/scope.h
@@ -28,6 +28,7 @@
#define SAVEt_HINTS 27
#define SAVEt_ALLOC 28
#define SAVEt_GENERIC_SVREF 29
+#define SAVEt_DESTRUCTOR_X 30
#define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow()
#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i))
@@ -35,11 +36,13 @@
#define SSPUSHIV(i) (PL_savestack[PL_savestack_ix++].any_iv = (IV)(i))
#define SSPUSHPTR(p) (PL_savestack[PL_savestack_ix++].any_ptr = (void*)(p))
#define SSPUSHDPTR(p) (PL_savestack[PL_savestack_ix++].any_dptr = (p))
+#define SSPUSHDXPTR(p) (PL_savestack[PL_savestack_ix++].any_dxptr = (p))
#define SSPOPINT (PL_savestack[--PL_savestack_ix].any_i32)
#define SSPOPLONG (PL_savestack[--PL_savestack_ix].any_long)
#define SSPOPIV (PL_savestack[--PL_savestack_ix].any_iv)
#define SSPOPPTR (PL_savestack[--PL_savestack_ix].any_ptr)
#define SSPOPDPTR (PL_savestack[--PL_savestack_ix].any_dptr)
+#define SSPOPDXPTR (PL_savestack[--PL_savestack_ix].any_dxptr)
#define SAVETMPS save_int((int*)&PL_tmps_floor), PL_tmps_floor = PL_tmps_ix
#define FREETMPS if (PL_tmps_ix > PL_tmps_floor) free_tmps()
@@ -81,9 +84,11 @@
#define SAVEGENERICSV(s) save_generic_svref((SV**)&(s))
#define SAVEDELETE(h,k,l) \
save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l))
-#define CALLDESTRUCTOR (*SSPOPDPTR)
#define SAVEDESTRUCTOR(f,p) \
- save_destructor((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p))
+ save_destructor((DESTRUCTORFUNC_NOCONTEXT_t)(f), SOFT_CAST(void*)(p))
+
+#define SAVEDESTRUCTOR_X(f,p) \
+ save_destructor_x((DESTRUCTORFUNC_t)(f), SOFT_CAST(void*)(p))
#define SAVESTACK_POS() \
STMT_START { \