diff options
author | Don Brady <[email protected]> | 2018-02-08 09:31:15 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-02-08 15:29:38 -0800 |
commit | fc5d4b6737b810be88d60ca5fa9de7e2fba4e26d (patch) | |
tree | 6772520c8a4902507678dcc731bf820e57cabc48 /module/lua/lstrlib.c | |
parent | ee00bfb2e6d50b75b045a37eae5b85a048a05aa7 (diff) |
Increase code coverage for Lua libraries
Add test coverage for lua libraries
Remove dead code in Lua implementation
Signed-off-by: Don Brady <[email protected]>
Diffstat (limited to 'module/lua/lstrlib.c')
-rw-r--r-- | module/lua/lstrlib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/module/lua/lstrlib.c b/module/lua/lstrlib.c index 7020f1bb7..cff5e894d 100644 --- a/module/lua/lstrlib.c +++ b/module/lua/lstrlib.c @@ -174,6 +174,7 @@ static int str_char (lua_State *L) { } +#if defined(LUA_USE_DUMP) static int writer (lua_State *L, const void* b, size_t size, void* B) { (void)L; luaL_addlstring((luaL_Buffer*) B, (const char *)b, size); @@ -191,7 +192,7 @@ static int str_dump (lua_State *L) { luaL_pushresult(&b); return 1; } - +#endif /* @@ -992,7 +993,9 @@ static int str_format (lua_State *L) { static const luaL_Reg strlib[] = { {"byte", str_byte}, {"char", str_char}, +#if defined(LUA_USE_DUMP) {"dump", str_dump}, +#endif {"find", str_find}, {"format", str_format}, {"gmatch", str_gmatch}, |