diff options
author | moteus <mimir@newmail.ru> | 2013-12-26 13:08:45 +0400 |
---|---|---|
committer | moteus <mimir@newmail.ru> | 2013-12-26 13:08:45 +0400 |
commit | 7b90a331bf1caecfa1ba1e2f3e7f87fa01c389b9 (patch) | |
tree | bdf13cff8a9eda9eb8c90b763f41cb06ea08942a /src/l52util.h | |
parent | 1ddc9bd2a0e5f9f4835e39c05df0850cb9aa44bf (diff) | |
download | lua-llthreads2-7b90a331bf1caecfa1ba1e2f3e7f87fa01c389b9.tar.gz lua-llthreads2-7b90a331bf1caecfa1ba1e2f3e7f87fa01c389b9.tar.bz2 lua-llthreads2-7b90a331bf1caecfa1ba1e2f3e7f87fa01c389b9.zip |
Fix. load library on Lua 5.2
Diffstat (limited to 'src/l52util.h')
-rw-r--r-- | src/l52util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/l52util.h b/src/l52util.h index f4f0497..94f1bfa 100644 --- a/src/l52util.h +++ b/src/l52util.h | |||
@@ -18,6 +18,9 @@ int luaL_typerror (lua_State *L, int narg, const char *tname); | |||
18 | 18 | ||
19 | void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l); | 19 | void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l); |
20 | 20 | ||
21 | |||
22 | #define lutil_require luaL_requiref | ||
23 | |||
21 | #else // lua 5.1 | 24 | #else // lua 5.1 |
22 | 25 | ||
23 | // functions form lua 5.2 | 26 | // functions form lua 5.2 |
@@ -29,6 +32,8 @@ void lua_rawgetp (lua_State *L, int index, const void *p); | |||
29 | void lua_rawsetp (lua_State *L, int index, const void *p); | 32 | void lua_rawsetp (lua_State *L, int index, const void *p); |
30 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); | 33 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); |
31 | 34 | ||
35 | void lutil_require(lua_State *L, const char* name, lua_CFunction fn, int glb); | ||
36 | |||
32 | #endif | 37 | #endif |
33 | 38 | ||
34 | int lutil_newmetatablep (lua_State *L, const void *p); | 39 | int lutil_newmetatablep (lua_State *L, const void *p); |