--- deliantra/server/include/cfperl.h 2008/04/11 13:59:06 1.95 +++ deliantra/server/include/cfperl.h 2009/01/08 19:23:44 1.105 @@ -52,7 +52,9 @@ #undef srand48 #undef drand48 #undef srandom +#undef opendir #undef readdir +#undef closedir #undef getprotobyname #undef gethostbyname #undef ctime @@ -87,7 +89,7 @@ #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_pv (name, (flags) | G_EVAL); SPAGAIN; -#define CALL_END CHECK_ERROR; FREETMPS; LEAVE +#define CALL_END PUTBACK; CHECK_ERROR; FREETMPS; LEAVE ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -99,6 +101,7 @@ void cfperl_make_book (object *book, int level); void cfperl_send_msg (client *ns, int color, const char *type, const char *msg); int cfperl_can_merge (object *ob1, object *ob2); +void cfperl_mapscript_activate (object *ob, int state, object *activator, object *originator = 0); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -111,6 +114,7 @@ # define SvUVAL64 SvUV #else typedef double val64; + typedef double uval64; # define newSVval64 newSVnv # define SvVAL64 SvNV # define newSVuval64 newSVnv @@ -182,14 +186,14 @@ { static MGVTBL vtbl; - static unordered_vector mortals; - MTH static void check_mortals (); - enum { F_DESTROYED = 0x01, F_DEBUG_TRACE = 0x02, }; - int ACC (RW, flags); + uint8 ACC (RW, flags); + + static unordered_vector mortals; + MTH static void check_mortals (); // object is delete'd after the refcount reaches 0 MTH int refcnt_cnt () const; @@ -287,7 +291,7 @@ void put (attachable *ext); // used only for user-defined key-value pairs - void put (const shstr &k, const shstr &v) + void put (shstr_tmp k, shstr_tmp v) { add (k); @@ -321,7 +325,7 @@ put_kw_string (k, v); } - void put (keyword k, const shstr &v) + void put (keyword k, shstr_tmp v) { put_kw_string (k, v); } @@ -365,7 +369,7 @@ void put (keyword k, signed long long v) { put_(k, (sint64)v); } void put (keyword k, unsigned long long v) { put_(k, (sint64)v); } - void put (keyword kbeg, keyword kend, const shstr &v) + void put (keyword kbeg, keyword kend, shstr_tmp v) { force (MAX_KEYWORD_LEN + 1); fadd (keyword_str [kbeg], keyword_len [kbeg]); fadd ('\n');