Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // how do you do this?
- #define function(lib, func)const char *__lib = #lib
- luaL_Reg functions[] = {
- {#func, (int *){ // args??
- //code here
- #define end }} \
- {0,0} \
- }; \
- luaL_register(l, __lib, functions); \
- // example usage
- function(_G, print)
- printblach(luaL_tostring(l, 1))
- end
Advertisement
Add Comment
Please, Sign In to add comment