Sol2: luajit 2.0.4 have luaL_loadbufferx and luaL_loadfilex

Created on 8 Aug 2017  路  4Comments  路  Source: ThePhD/sol2

When invoking sol::state::script_file() code going to infinite loop.
There is no need re-implement these functions for 2.0.4.

Bug.Well Shit

Most helpful comment

Forcibly check for 2.0.1 and turn off compat functions for LuaJIT if that's the case: https://github.com/ThePhD/sol2/blob/develop/sol/compatibility/5.1.0.h#L160

All 4 comments

Last I checked, 2.0.4 had _neither_ of these functions....

But, both of these functions are implemented in 2.0.5. Time to update the compatibility shim...

Checked in 2.0.1 from http://luajit.org/download.html
koncord@Commodore64 ~/tes3mp-dev/LuaJIT-2.0.1 $ grep -rn ./src -e "luaL_loadfilex" ./src/lib_base.c:380: status = luaL_loadfilex(L, fname ? strdata(fname) : NULL, ./src/lj_load.c:84:LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename, ./src/lj_load.c:119: return luaL_loadfilex(L, filename, NULL); ./src/lauxlib.h:81:LUALIB_API int (luaL_loadfilex) (lua_State *L, const char *filename,

Forcibly check for 2.0.1 and turn off compat functions for LuaJIT if that's the case: https://github.com/ThePhD/sol2/blob/develop/sol/compatibility/5.1.0.h#L160

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hmenke picture hmenke  路  6Comments

patlecat picture patlecat  路  7Comments

mrgreywater picture mrgreywater  路  4Comments

Erwsaym picture Erwsaym  路  4Comments

Moneyl picture Moneyl  路  10Comments