CapsAdmin

Untitled

Mar 15th, 2011
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. // how do you do this?
  2.  
  3. #define function(lib, func)const char *__lib = #lib
  4.     luaL_Reg functions[] = {
  5.         {#func, (int *){ // args??
  6.             //code here
  7.  
  8. #define end }} \
  9.         {0,0} \
  10.     }; \
  11.     luaL_register(l, __lib, functions); \
  12.  
  13.  
  14. // example usage
  15.    
  16. function(_G, print)
  17.     printblach(luaL_tostring(l, 1))
  18. end
Advertisement
Add Comment
Please, Sign In to add comment