Skip to content

Commit

Permalink
tests: enable debug information in lua_dump
Browse files Browse the repository at this point in the history
Disable strip of debug information about the function passed to
`lua_dump`, see [1]:

> If strip is true, the binary representation may not
> include all debug information about the function, to save space.

This change is likely to increase the code coverage.

1. https://www.lua.org/manual/5.3/manual.html#lua_dump
  • Loading branch information
ligurio committed Feb 7, 2024
1 parent 918b01a commit a7b0039
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ luaL_loadbytecode(lua_State *L, const char *buff, size_t sz, const char *name)
#if LUA_VERSION_NUM < 503
rc = lua_dump(L, writer, &state);
#else /* Lua 5.3+ */
rc = lua_dump(L, writer, &state, 1);
rc = lua_dump(L, writer, &state, 0);
#endif /* LUA_VERSION_NUM */
if (rc != 0) {
return rc;
Expand Down

0 comments on commit a7b0039

Please sign in to comment.