diff options
author | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-18 19:56:41 +0800 |
commit | 45328cbadd8a946c19a77301f218efbf650e2f28 (patch) | |
tree | 8ec4f3a9737b2cbb9744f8347a56783743be2a4c /Runtime/LuaBind/LuaBindCFunctions.h | |
parent | b5702ece4c2cf751c252e76fb885a7ec41ccabe8 (diff) |
*misc
Diffstat (limited to 'Runtime/LuaBind/LuaBindCFunctions.h')
-rw-r--r-- | Runtime/LuaBind/LuaBindCFunctions.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/Runtime/LuaBind/LuaBindCFunctions.h b/Runtime/LuaBind/LuaBindCFunctions.h deleted file mode 100644 index f0f07dd..0000000 --- a/Runtime/LuaBind/LuaBindCFunctions.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __LUA_BIND_CFUNCTIONS_H__ -#define __LUA_BIND_CFUNCTIONS_H__ - -#include "LuaBindConfig.h" - -/** - * luax_cfunction里的函数用来注册给lua,一些特殊功能的通用函数。 -*/ - -namespace -{ - - // 获得第一个upvalue - extern int luax_c_getupvalue(lua_State* L); - - // 调用此函数时会报错,upvalue(1)是错误信息 - extern int luax_c_errfunc(lua_State* L); - -#define luax_is(T, L, i) (lua_is##T(L, i)) -#define luax_isnumber(L, i) luax_is(number, L, i) - - inline int luax_isinteger(lua_State* L, int i) - { - if (!luax_isnumber(L, i)) - return 0; - return lua_tonumber(L, i) == lua_tointeger(L, i); - } - - inline int luax_isfloat(lua_State* L, int i) - { - if (!luax_isnumber(L, i)) - return 0; - return lua_tonumber(L, i) != lua_tointeger(L, i); - } - -} - -#endif
\ No newline at end of file |