Skip to content

Commit

Permalink
lua5.2 - fix openLuaLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
joequant committed Jan 12, 2018
1 parent 8366cfd commit 44eaac7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/celestia/celx.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,13 @@ static void openLuaLibrary(lua_State* l,
const char* name,
lua_CFunction func)
{
#if LUA_VER >= 0x050200
luaL_requiref(l, name, func, 1);
#else
lua_pushcfunction(l, func);
lua_pushstring(l, name);
lua_call(l, 1, 0);
#endif
}
#endif

Expand Down

0 comments on commit 44eaac7

Please sign in to comment.