… | |
… | |
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 (); |
… | |
… | |
99 | void cfperl_emergency_save (); |
102 | void cfperl_emergency_save (); |
100 | void cfperl_cleanup (int make_core); |
103 | void cfperl_cleanup (int make_core); |
101 | void cfperl_make_book (object *book, int level); |
104 | void cfperl_make_book (object *book, int level); |
102 | void cfperl_send_msg (client *ns, int color, const char *type, const char *msg); |
105 | void cfperl_send_msg (client *ns, int color, const char *type, const char *msg); |
103 | int cfperl_can_merge (object *ob1, object *ob2); |
106 | int cfperl_can_merge (object *ob1, object *ob2); |
|
|
107 | void cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator = 0); |
|
|
108 | |
|
|
109 | bool is_match_expr (const char *expr); |
|
|
110 | /* applies the match expression and returns true if it matches */ |
|
|
111 | bool match (const char *expr, object *ob, object *self = 0, object *source = 0, object *originator = 0); |
104 | |
112 | |
105 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
113 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
106 | |
114 | |
107 | #if IVSIZE >= 8 |
115 | #if IVSIZE >= 8 |
108 | typedef IV val64; |
116 | typedef IV val64; |