--- deliantra/server/include/cfperl.h 2006/12/14 20:39:54 1.36 +++ deliantra/server/include/cfperl.h 2006/12/16 03:08:26 1.38 @@ -66,7 +66,7 @@ #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_SOCKET(o) DT_SOCKET, (void *)static_cast (o) +#define ARG_SOCKET(o) DT_SOCKET, (void *)static_cast (o) // the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension @@ -357,6 +357,19 @@ void cancel () { GEventAPI->cancel ((pe_watcher *)pe); } // private }; +struct iw : watcher, callback +{ + template + iw (O object, M method) + : callback (object, method) + { + alloc (); + } + +private: + void alloc (); +}; + struct iow : watcher, callback { template @@ -366,9 +379,9 @@ alloc (); } - iow &fd (int fd); + void fd (int fd); int poll (); - iow &poll (int events); + void poll (int events); private: void alloc ();