=== modified file swig/lua.i --- swig/lua.i 2011-11-07 22:22:56 +0000 +++ swig/lua.i 2012-01-22 22:40:39 +0000 @@ -119,6 +119,23 @@ } lua_pop(L, 1); } + + void operator()(adchpp::Entity& c, const adchpp::AdcCommand& cmd, bool& i) { + pushFunction(); + + SWIG_NewPointerObj(L, &c, SWIGTYPE_p_adchpp__Entity, 0); + SWIG_NewPointerObj(L, &cmd, SWIGTYPE_p_adchpp__AdcCommand, 0); + lua_pushboolean(L, i); + + if(docall(3, 1) != 0) { + return; + } + + if(lua_isboolean(L, -1)) { + i &= lua_toboolean(L, -1) == 1; + } + lua_pop(L, 1); + } void operator()(const adchpp::SimpleXML& s) { pushFunction(); @@ -244,6 +261,10 @@ $1 = LuaFunction(L); } +%typemap(in) std::function { + $1 = LuaFunction(L); +} + %typemap(in) std::function { $1 = LuaFunction(L); }