Line 0
Link Here
|
|
|
1 |
Index: libquvi-0.9.4/src/lua/init.c |
2 |
=================================================================== |
3 |
--- ./src/lua/init.c |
4 |
+++ ./src/lua/init.c |
5 |
@@ -80,10 +80,17 @@ QuviError l_init(_quvi_t q) |
6 |
return (QUVI_ERROR_LUA_INIT); |
7 |
|
8 |
luaL_openlibs(q->handle.lua); |
9 |
+#if LUA_VERSION_NUM < 502 |
10 |
luaL_register(q->handle.lua, "quvi", quvi_reg_meth); |
11 |
luaL_register(q->handle.lua, "quvi.http", quvi_http_reg_meth); |
12 |
luaL_register(q->handle.lua, "quvi.crypto", quvi_crypto_reg_meth); |
13 |
luaL_register(q->handle.lua, "quvi.base64", quvi_base64_reg_meth); |
14 |
+#else |
15 |
+ luaL_newlib(q->handle.lua, quvi_reg_meth); |
16 |
+ luaL_newlib(q->handle.lua, quvi_http_reg_meth); |
17 |
+ luaL_newlib(q->handle.lua, quvi_crypto_reg_meth); |
18 |
+ luaL_newlib(q->handle.lua, quvi_base64_reg_meth); |
19 |
+#endif |
20 |
|
21 |
return (QUVI_OK); |
22 |
} |