Skip to content

Commit

Permalink
Merge pull request #1210 from cjmayo/luaopenlib
Browse files Browse the repository at this point in the history
GeanyLua: Use luaL_register instead of luaL_openlib
  • Loading branch information
eht16 committed Jan 15, 2023
2 parents a8fd231 + be92140 commit 2665511
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions geanylua/glspi_kfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ static gint luaopen_keyfile(lua_State *L)
lua_pushstring(L,"__gc");
lua_pushcfunction(L,kfile_done);
lua_rawset(L,-3);
luaL_openlib(L, NULL, &kfile_funcs[1], 0);
luaL_openlib(L, LUA_MODULE_NAME, kfile_funcs, 0);
luaL_register(L, NULL, &kfile_funcs[1]);
luaL_register(L, LUA_MODULE_NAME, kfile_funcs);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion geanylua/glspi_run.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ static void show_error(lua_State *L, const gchar *script_file)

static gint glspi_init_module(lua_State *L, const gchar *script_file, gint caller, GKeyFile*proj, const gchar*script_dir)
{
luaL_openlib(L, LUA_MODULE_NAME, glspi_timer_funcs, 0);
luaL_register(L, LUA_MODULE_NAME, glspi_timer_funcs);
glspi_init_sci_funcs(L);
glspi_init_doc_funcs(L);
glspi_init_mnu_funcs(L);
Expand Down
4 changes: 2 additions & 2 deletions geanylua/gsdlg_lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ gint luaopen_dialog(lua_State *L)
lua_pushcfunction(L,gsdl_done);
lua_rawset(L,-3);

luaL_openlib(L, NULL, &gsdl_funcs[1], 0);
luaL_openlib(L, LUA_MODULE_NAME, gsdl_funcs, 0);
luaL_register(L, NULL, &gsdl_funcs[1]);
luaL_register(L, LUA_MODULE_NAME, gsdl_funcs);
return 0;
}

Expand Down

0 comments on commit 2665511

Please sign in to comment.