diff --git a/src/luaexport/LuaEventHelpers.hpp b/src/luaexport/LuaEventHelpers.hpp index 0e0dfe0..3862425 100644 --- a/src/luaexport/LuaEventHelpers.hpp +++ b/src/luaexport/LuaEventHelpers.hpp @@ -45,4 +45,28 @@ ssig::ScopedConnection* makeConnection( return new ssig::ScopedConnection(con); } +namespace luabind { + template + struct default_converter> + : native_converter_base> + { + void to(lua_State* L, ssig::Connection const& value) + { + luabind::object o( + L, static_cast(makeConnection(value))); + o.push(L); + } + }; + + template + struct default_converter const> + : default_converter> + {}; + + template + struct default_converter const&> + : default_converter> + {}; +} // namespace luabind + #endif // include guard