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.c | |
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.c')
-rw-r--r-- | src/l52util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/l52util.c b/src/l52util.c index 592c1d1..0b40c3e 100644 --- a/src/l52util.c +++ b/src/l52util.c | |||
@@ -43,6 +43,11 @@ void lua_rawsetp (lua_State *L, int index, const void *p){ | |||
43 | lua_rawset(L, index); | 43 | lua_rawset(L, index); |
44 | } | 44 | } |
45 | 45 | ||
46 | void lutil_require(lua_State *L, const char* name, lua_CFunction fn, int glb) { | ||
47 | // @fixme generate error if we can not load module | ||
48 | lua_cpcall(L, fn, NULL); | ||
49 | } | ||
50 | |||
46 | #endif | 51 | #endif |
47 | 52 | ||
48 | int lutil_newmetatablep (lua_State *L, const void *p) { | 53 | int lutil_newmetatablep (lua_State *L, const void *p) { |