… | |
… | |
81 | LOG (llevError, "runtime error in %s: %s", __func__, SvPVutf8_nolen (ERRSV)); |
81 | LOG (llevError, "runtime error in %s: %s", __func__, SvPVutf8_nolen (ERRSV)); |
82 | |
82 | |
83 | inline int call_pvsv (const char *ob, I32 flags) { return call_pv (ob, flags); } |
83 | inline int call_pvsv (const char *ob, I32 flags) { return call_pv (ob, flags); } |
84 | inline int call_pvsv (SV *ob, I32 flags) { return call_sv (ob, flags); } |
84 | inline int call_pvsv (SV *ob, I32 flags) { return call_sv (ob, flags); } |
85 | |
85 | |
|
|
86 | // TODO: temporarily enabled pushstack/popstack for all calls from the core, to maybe fix object memleak? |
|
|
87 | #define CALL_PUSH PUSHSTACKi (PERLSI_UNKNOWN) |
|
|
88 | #define CALL_POP PUTBACK; POPSTACK; SPAGAIN |
86 | #define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) |
89 | #define CALL_BEGIN(args) dSP; CALL_PUSH; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) |
87 | #define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc |
90 | #define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc |
88 | #define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) |
91 | #define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) |
89 | #define CALL_CALL(name, flags) PUTBACK; int count = call_pvsv (name, (flags) | G_EVAL); SPAGAIN; |
92 | #define CALL_CALL(name, flags) PUTBACK; int count = call_pvsv (name, (flags) | G_EVAL); SPAGAIN; |
90 | #define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE |
93 | #define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE; CALL_POP |
91 | |
94 | |
92 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
95 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
93 | |
96 | |
94 | void cfperl_init (); |
97 | void cfperl_init (); |
95 | void cfperl_main (); |
98 | void cfperl_main (); |