elua: use up to date lua API
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Wed, 28 Jun 2017 09:51:29 +0000 (11:51 +0200)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Wed, 28 Jun 2017 09:51:29 +0000 (11:51 +0200)
luaL_reg is a 5.0 API which we don't support.

src/lib/elua/elua.c
src/lib/elua/elua_private.h
src/lib/elua/io.c

index 185f592..2d9eebe 100644 (file)
@@ -355,7 +355,7 @@ _elua_get_localeconv(lua_State *L)
    return 1;
 };
 
-const luaL_reg gettextlib[] =
+const luaL_Reg gettextlib[] =
 {
    { "bind_textdomain", _elua_gettext_bind_textdomain },
    { "get_message_language", _elua_get_message_language },
@@ -442,7 +442,7 @@ _elua_file_rmrf(lua_State *L)
    return 1;
 }
 
-const luaL_reg _elua_cutillib[] =
+const luaL_Reg _elua_cutillib[] =
 {
    { "init_module", _elua_module_init },
    { "popenv"     , _elua_io_popen    },
index 35c4f85..9f62c5f 100644 (file)
 #include <lualib.h>
 #include <lauxlib.h>
 
-// FIX for luajit 2.1.0-beta3: see https://phab.enlightenment.org/T2728
-#ifndef luaL_reg
-# define luaL_reg luaL_Reg
-#endif
-
 #include "Elua.h"
 
 struct _Elua_State
index 6835e99..186170b 100644 (file)
@@ -313,7 +313,7 @@ elua_ftostring(lua_State *L)
    return 1;
 }
 
-static const luaL_reg elua_popenlib[] =
+static const luaL_Reg elua_popenlib[] =
 {
    { "close"     , elua_close     },
    { "flush"     , elua_flush     },