1 // Copyright Daniel Wallin 2009. Use, modification and distribution is
2 // subject to the Boost Software License, Version 1.0. (See accompanying
3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #include <luabind/luabind.hpp>
29 struct Y_wrap
: Y
, luabind::wrap_base
32 void test_main(lua_State
* L
)
34 using namespace luabind
;
38 .def(constructor
<>()),
40 class_
<Y
, Y_wrap
>("Y")
46 " function Y_lua.__init(self)\n"
51 for (int i
= 0; i
< 100; ++i
)
53 lua_State
* thread
= lua_newthread(L
);
54 int ref
= luaL_ref(L
, LUA_REGISTRYINDEX
);
64 luaL_unref(L
, LUA_REGISTRYINDEX
, ref
);