#define ENTER \
STMT_START { \
push_scope(); \
- DEBUG_l(deb("ENTER scope %ld at %s:%d\n", \
- scopestack_ix, __FILE__, __LINE__)); \
+ DEBUG_l(WITH_THR(deb("ENTER scope %ld at %s:%d\n", \
+ scopestack_ix, __FILE__, __LINE__))); \
} STMT_END
#define LEAVE \
STMT_START { \
- DEBUG_l(deb("LEAVE scope %ld at %s:%d\n", \
- scopestack_ix, __FILE__, __LINE__)); \
+ DEBUG_l(WITH_THR(deb("LEAVE scope %ld at %s:%d\n", \
+ scopestack_ix, __FILE__, __LINE__))); \
pop_scope(); \
} STMT_END
#else
#define SAVECLEARSV(sv) save_clearsv(SOFT_CAST(SV**)&(sv))
#define SAVEDELETE(h,k,l) \
save_delete(SOFT_CAST(HV*)(h), SOFT_CAST(char*)(k), (I32)(l))
+#ifdef PERL_OBJECT
+#define CALLDESTRUCTOR this->*SSPOPDPTR
+#define SAVEDESTRUCTOR(f,p) \
+ save_destructor((DESTRUCTORFUNC)(f),SOFT_CAST(void*)(p))
+#else
+#define CALLDESTRUCTOR *SSPOPDPTR
#define SAVEDESTRUCTOR(f,p) \
save_destructor(SOFT_CAST(void(*)_((void*)))(f),SOFT_CAST(void*)(p))
+#endif
#define SAVESTACK_POS() STMT_START { \
SSCHECK(2); \
SSPUSHINT(stack_sp - stack_base); \