Commit Briefs
luzer: fix memory leak in FDP (ligurio/gh-52-fix-fdp-memleak)
Fixes #52
luzer: fix compilation with latest PUC Rio Lua
The compilation is broken with the latest version of PUC Rio Lua: ``` /home/runner/work/lua-c-api-tests/lua-c-api-tests/build/luzer/source/luzer/custom_mutator_lib.c:19:33: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] 19 | size_t lua_objlen(lua_State *L, int index); | ^ /home/runner/work/lua-c-api-tests/lua-c-api-tests/build/luzer/source/luzer/custom_mutator_lib.c:19:8: error: conflicting types for 'lua_rawlen' 19 | size_t lua_objlen(lua_State *L, int index); | ^ /home/runner/work/lua-c-api-tests/lua-c-api-tests/build/lua-master/source/luaconf.h:357:26: note: expanded from macro 'lua_objlen' 357 | #define lua_objlen(L,i) lua_rawlen(L, (i)) | ^ /home/runner/work/lua-c-api-tests/lua-c-api-tests/build/lua-master/source/lua.h:204:26: note: previous declaration is here 204 | LUA_API lua_Unsigned (lua_rawlen) (lua_State *L, int idx); | ^ 2 errors generated. ``` The patch fixes that by adding a macro `lua_objlen`, the function `lua_objlen()` is not available in Lua 5.2+ as it was renamed to `lua_rawlen()`, see "8.3 – Changes in the API" in Lua 5.2 Reference Manual [1]. Also, linkage specification under the macro `__cplusplus` was removed because it is not needed. 1. https://www.lua.org/manual/5.2/manual.html
