--- deliantra/server/include/cfperl.h 2010/04/06 21:11:48 1.118 +++ deliantra/server/include/cfperl.h 2010/04/11 04:09:56 1.119 @@ -83,11 +83,14 @@ inline int call_pvsv (const char *ob, I32 flags) { return call_pv (ob, flags); } inline int call_pvsv (SV *ob, I32 flags) { return call_sv (ob, flags); } -#define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) +// TODO: temporarily enabled pushstack/popstack for all calls from the core, to maybe fix object memleak? +#define CALL_PUSH PUSHSTACKi (PERLSI_UNKNOWN) +#define CALL_POP PUTBACK; POPSTACK; SPAGAIN +#define CALL_BEGIN(args) dSP; CALL_PUSH; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) #define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc #define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) #define CALL_CALL(name, flags) PUTBACK; int count = call_pvsv (name, (flags) | G_EVAL); SPAGAIN; -#define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE +#define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE; CALL_POP //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////