From: Ruben Kerkhof Date: Sun, 14 Aug 2016 13:08:40 +0000 (+0200) Subject: Lua plugin: Terminate array with sentinel X-Git-Tag: collectd-5.6.0~33^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e61b8a91ed7c21e01ff40006837d319eaeef24ab;p=collectd.git Lua plugin: Terminate array with sentinel From the API docs: Any array of luaL_Reg must end with a sentinel entry in which both name and func are NULL. --- diff --git a/src/lua.c b/src/lua.c index 79f288be..3b8b3da0 100644 --- a/src/lua.c +++ b/src/lua.c @@ -370,7 +370,9 @@ static luaL_Reg collectdlib[] = { {"log_warning", lua_cb_log_warning}, {"dispatch_values", lua_cb_dispatch_values}, {"register_read", lua_cb_register_read}, - {"register_write", lua_cb_register_write}}; + {"register_write", lua_cb_register_write}, + {NULL, NULL} +}; static int open_collectd(lua_State *L) /* {{{ */ {