summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2020-05-29 17:45:34 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2020-05-29 17:46:10 +0200
commit6dce869a17baae6002c3cec04e975c0730461a00 (patch)
tree795de34980675bf2ab1f06b0fe01fb60a0058d11
parentf78d54051c26a8d3c9b3bfc61e44df09bf24e401 (diff)
elua: fix build with luajit or lua 5.1
-rw-r--r--src/lib/elua/elua_private.h4
-rw-r--r--src/lib/elua/io.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/elua/elua_private.h b/src/lib/elua/elua_private.h
index 02e99a481b..445bacc93d 100644
--- a/src/lib/elua/elua_private.h
+++ b/src/lib/elua/elua_private.h
@@ -53,12 +53,12 @@ Eina_Bool _elua_state_io_setup(const Elua_State *es);
53#if LUA_VERSION_NUM < 502 53#if LUA_VERSION_NUM < 502
54 54
55#define elua_register(L, lib) luaL_register(L, NULL, 0) 55#define elua_register(L, lib) luaL_register(L, NULL, 0)
56#define elua_rawlen(L, i) lua_rawlen(L, i) 56#define elua_strlen(L, i) lua_strlen(L, i)
57 57
58#else 58#else
59 59
60#define elua_register(L, lib) luaL_setfuncs(L, lib, 0) 60#define elua_register(L, lib) luaL_setfuncs(L, lib, 0)
61#define elua_rawlen(L, i) lua_rawlen(L, i) 61#define elua_strlen(L, i) lua_rawlen(L, i)
62 62
63#endif 63#endif
64 64
diff --git a/src/lib/elua/io.c b/src/lib/elua/io.c
index 15c0c44924..0bf978d6c6 100644
--- a/src/lib/elua/io.c
+++ b/src/lib/elua/io.c
@@ -167,7 +167,7 @@ read_line(lua_State *L, FILE *f)
167 if (fgets(p, LUAL_BUFFERSIZE, f) == NULL) 167 if (fgets(p, LUAL_BUFFERSIZE, f) == NULL)
168 { 168 {
169 luaL_pushresult(&b); 169 luaL_pushresult(&b);
170 return (elua_rawlen(L, -1) > 0); 170 return (elua_strlen(L, -1) > 0);
171 } 171 }
172 l = strlen(p); 172 l = strlen(p);
173 if (!l || p[l - 1] != '\n') 173 if (!l || p[l - 1] != '\n')
@@ -198,7 +198,7 @@ read_chars(lua_State *L, FILE *f, size_t n)
198 n -= nr; 198 n -= nr;
199 } while (n > 0 && nr == rlen); 199 } while (n > 0 && nr == rlen);
200 luaL_pushresult(&b); 200 luaL_pushresult(&b);
201 return (n == 0 || elua_rawlen(L, -1) > 0); 201 return (n == 0 || elua_strlen(L, -1) > 0);
202} 202}
203 203
204static int 204static int