--- deliantra/server/include/cfperl.h 2006/09/09 21:48:28 1.24 +++ deliantra/server/include/cfperl.h 2006/09/20 16:46:35 1.28 @@ -53,13 +53,13 @@ #define ARG_INT64(v) DT_INT64 , static_cast (v) #define ARG_DOUBLE(v) DT_DOUBLE, static_cast (v) #define ARG_STRING(v) DT_STRING, static_cast (v) -#define ARG_DATA(s,l) DT_DATA , static_cast (s), (l) -#define ARG_OBJECT(o) DT_OBJECT, (void *)static_cast (o) -#define ARG_MAP(o) DT_MAP , (void *)static_cast (o) -#define ARG_PLAYER(o) DT_PLAYER, (void *)static_cast (o) -#define ARG_ARCH(o) DT_ARCH , (void *)static_cast (o) -#define ARG_PARTY(o) DT_PARTY , (void *)static_cast (o) -#define ARG_REGION(o) DT_REGION, (void *)static_cast (o) +#define ARG_DATA(s,l) DT_DATA , static_cast (s), int (l) +#define ARG_OBJECT(o) DT_OBJECT, (void *)static_cast (o) +#define ARG_MAP(o) DT_MAP , (void *)static_cast (o) +#define ARG_PLAYER(o) DT_PLAYER, (void *)static_cast (o) +#define ARG_ARCH(o) DT_ARCH , (void *)static_cast (o) +#define ARG_PARTY(o) DT_PARTY , (void *)static_cast (o) +#define ARG_REGION(o) DT_REGION, (void *)static_cast (o) // the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension @@ -75,9 +75,11 @@ //TODO should index into @result #define RESULT(idx,type) cfperl_result_ ## type (idx) #define RESULT_INT(idx) RESULT(idx, INT) +#define RESULT_MAP(idx) RESULT(idx, MAP) bool cfperl_invoke (event_type event, ...); int cfperl_result_INT (int idx); +int cfperl_result_MAP (int idx); struct attachable_base { @@ -110,6 +112,13 @@ : self (0), cb (0), attach (src.attach) { } + + attachable_base &operator = (const attachable_base &src) + { + clear (); + attach = src.attach; + return *this; + } }; // objects attachable from perl (or any other extension) should include or