Skip to content

Commit 2665511

Browse files
authored
Merge pull request #1210 from cjmayo/luaopenlib
GeanyLua: Use luaL_register instead of luaL_openlib
2 parents a8fd231 + be92140 commit 2665511

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

geanylua/glspi_kfile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ static gint luaopen_keyfile(lua_State *L)
395395
lua_pushstring(L,"__gc");
396396
lua_pushcfunction(L,kfile_done);
397397
lua_rawset(L,-3);
398-
luaL_openlib(L, NULL, &kfile_funcs[1], 0);
399-
luaL_openlib(L, LUA_MODULE_NAME, kfile_funcs, 0);
398+
luaL_register(L, NULL, &kfile_funcs[1]);
399+
luaL_register(L, LUA_MODULE_NAME, kfile_funcs);
400400
return 0;
401401
}
402402

geanylua/glspi_run.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ static void show_error(lua_State *L, const gchar *script_file)
393393

394394
static gint glspi_init_module(lua_State *L, const gchar *script_file, gint caller, GKeyFile*proj, const gchar*script_dir)
395395
{
396-
luaL_openlib(L, LUA_MODULE_NAME, glspi_timer_funcs, 0);
396+
luaL_register(L, LUA_MODULE_NAME, glspi_timer_funcs);
397397
glspi_init_sci_funcs(L);
398398
glspi_init_doc_funcs(L);
399399
glspi_init_mnu_funcs(L);

geanylua/gsdlg_lua.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ gint luaopen_dialog(lua_State *L)
425425
lua_pushcfunction(L,gsdl_done);
426426
lua_rawset(L,-3);
427427

428-
luaL_openlib(L, NULL, &gsdl_funcs[1], 0);
429-
luaL_openlib(L, LUA_MODULE_NAME, gsdl_funcs, 0);
428+
luaL_register(L, NULL, &gsdl_funcs[1]);
429+
luaL_register(L, LUA_MODULE_NAME, gsdl_funcs);
430430
return 0;
431431
}
432432

0 commit comments

Comments
 (0)