Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "oolua/oolua.h"
- typedef struct {
- int x, y;
- } point;
- OOLUA_PROXY(point)
- OOLUA_MGET_MSET(x)
- OOLUA_MGET_MSET(y)
- OOLUA_PROXY_END
- OOLUA_EXPORT_FUNCTIONS(point, set_x, set_y)
- OOLUA_EXPORT_FUNCTIONS_CONST(point, get_x, get_y)
- extern "C" int luaopen_tst(lua_State *L) {
- OOLUA::setup_user_lua_state(L);
- OOLUA::register_class<point>(L);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement