1 Star 0 Fork 1

git123hub / luajit-test

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
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 )

Sign in for post a comment

C/C++
1
https://gitee.com/git123hub/luajit-test.git
git@gitee.com:git123hub/luajit-test.git
git123hub
luajit-test
luajit-test
master

Search