… | |
… | |
83 | |
83 | |
84 | #define CHECK_ERROR \ |
84 | #define CHECK_ERROR \ |
85 | if (SvTRUE (ERRSV)) \ |
85 | if (SvTRUE (ERRSV)) \ |
86 | LOG (llevError, "runtime error in %s: %s", __func__, SvPVutf8_nolen (ERRSV)); |
86 | LOG (llevError, "runtime error in %s: %s", __func__, SvPVutf8_nolen (ERRSV)); |
87 | |
87 | |
|
|
88 | inline int call_pvsv (const char *ob, I32 flags) { return call_pv (ob, flags); } |
|
|
89 | inline int call_pvsv (SV *ob, I32 flags) { return call_sv (ob, flags); } |
|
|
90 | |
88 | #define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) |
91 | #define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) |
89 | #define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc |
92 | #define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc |
90 | #define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) |
93 | #define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) |
91 | #define CALL_CALL(name, flags) PUTBACK; int count = call_pv (name, (flags) | G_EVAL); SPAGAIN; |
94 | #define CALL_CALL(name, flags) PUTBACK; int count = call_pvsv (name, (flags) | G_EVAL); SPAGAIN; |
92 | #define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE |
95 | #define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE |
93 | |
96 | |
94 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
97 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
95 | |
98 | |
96 | void cfperl_init (); |
99 | void cfperl_init (); |