--- deliantra/server/include/cfperl.h 2018/11/17 23:33:17 1.130 +++ deliantra/server/include/cfperl.h 2018/12/05 19:13:21 1.133 @@ -1,6 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * + * Copyright (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * * Deliantra is free software: you can redistribute it and/or modify it under @@ -173,7 +174,7 @@ #define ARG_REGION(o) DT_REGION, (void *)(static_cast (o)) // the ", ## __VA_ARGS" is, unfortunately, a gnu-cpp extension -#define INVOKE(obj,event, ...) (expect_false ((obj)->should_invoke (event)) ? (obj)->invoke (event, ## __VA_ARGS__, DT_END) : 0) +#define INVOKE(obj,event, ...) (ecb_expect_false ((obj)->should_invoke (event)) ? (obj)->invoke (event, ## __VA_ARGS__, DT_END) : 0) #define INVOKE_GLOBAL(event, ...) INVOKE (&gbl_ev, EVENT_ ## GLOBAL ## _ ## event, ## __VA_ARGS__) #define INVOKE_ATTACHABLE(event, obj, ...) INVOKE (obj , EVENT_ ## ATTACHABLE ## _ ## event, ## __VA_ARGS__) #define INVOKE_OBJECT(event, obj, ...) INVOKE (obj , EVENT_ ## OBJECT ## _ ## event, ## __VA_ARGS__) @@ -208,7 +209,7 @@ // object is delete'd after the refcount reaches 0 MTH int refcnt_cnt () const; // check wether the object has died and destroy - MTH void refcnt_chk () { if (expect_false (refcnt <= 0)) do_check (); } + MTH void refcnt_chk () { if (ecb_expect_false (refcnt <= 0)) do_check (); } // destroy the object unless it was already destroyed // this politely asks everybody interested the reduce @@ -267,7 +268,7 @@ return ev_want_event [event] || cb; } - bool invoke (event_type event, ...); + bool invoke (/*event_type*/int event, ...); MTH void instantiate (); void reattach (); @@ -310,7 +311,7 @@ // actually cede's far more often static bool cede_to_tick () { - if (expect_true (!cede_pending)) + if (ecb_expect_true (!cede_pending)) return false; do_cede_to_tick ();