Watch 1 Star 0 Fork 1

git123hub / luajit-testC/C++

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
Nothing here. spread retract

Clone or download
lua-fn-aliases.h 671 Bytes
Copy Edit Web IDE Raw Blame History
My main account authored 2018-01-03 22:21 . Add files via upload
#define SETFIELD_INT(L, NAME)\
(lua_pushinteger(L, NAME),\
lua_setfield(L, -2, #NAME))
/*
#define SETFIELD_RGBI(L, NAME) (\
SETFIELD_INT(L, NAME##_RED), SETFIELD_INT(L, NAME##_GREEN), SETFIELD_INT(L, NAME##_BLUE), SETFIELD_INT(L, NAME##_INTENSITY))
*/
#define SETFIELD_INTX(L, NAME, VALUE)\
(lua_pushinteger(L, VALUE),\
lua_setfield(L, -2, #NAME))
#define SET_GLOBAL_ALIAS(L, NAME, ALIAS)\
(lua_getglobal(L, NAME),\
lua_setglobal(L, ALIAS))
#define SET_ALIAS(L, NAME, ALIAS)\
(lua_getfield(L, -1, NAME),\
lua_setfield(L, -2, ALIAS))
#define SET_CFUNCTION(L, NAME, func)\
(lua_pushcfunction(L, func),\
lua_setfield(L, -2, NAME))

Comment ( 0 )

You need to Sign in for post a comment

Help Search

183227_9af5e6a8_1826025 111910_4d91f001_1826025