mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Increase code coverage for Lua libraries
Add test coverage for lua libraries Remove dead code in Lua implementation Signed-off-by: Don Brady <don.brady@delphix.com>
This commit is contained in:
committed by
Brian Behlendorf
parent
ee00bfb2e6
commit
fc5d4b6737
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user