Advertisement
losinggeneration

OOLua 2.0.0 beta

Aug 6th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include "oolua/oolua.h"
  2.  
  3. typedef struct {
  4.     int x, y;
  5. } point;
  6.  
  7. OOLUA_PROXY(point)
  8.     OOLUA_MGET_MSET(x)
  9.     OOLUA_MGET_MSET(y)
  10. OOLUA_PROXY_END
  11.  
  12. OOLUA_EXPORT_FUNCTIONS(point, set_x, set_y)
  13. OOLUA_EXPORT_FUNCTIONS_CONST(point, get_x, get_y)
  14.  
  15. extern "C" int luaopen_tst(lua_State *L) {
  16.     OOLUA::setup_user_lua_state(L);
  17.     OOLUA::register_class<point>(L);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement