From: Ruben Kerkhof Date: Sun, 14 Aug 2016 09:59:03 +0000 (+0200) Subject: Lua plugin: use existing type for functions array X-Git-Tag: collectd-5.6.0~33^2~10 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=f6c4f3e43d5a8a49de8f6a5d9ee8ae362fc7f0b1;p=collectd.git Lua plugin: use existing type for functions array --- diff --git a/src/lua.c b/src/lua.c index b89c8240..a3f2037e 100644 --- a/src/lua.c +++ b/src/lua.c @@ -62,11 +62,6 @@ typedef struct { int callback_id; } clua_callback_data_t; -typedef struct { - const char *name; - lua_CFunction func; -} lua_c_function_t; - static char base_path[PATH_MAX]; static lua_script_t *scripts; @@ -367,7 +362,7 @@ static int lua_cb_register_write(lua_State *L) /* {{{ */ return 0; } /* }}} int lua_cb_register_write */ -static lua_c_function_t lua_c_functions[] = { +static luaL_Reg lua_c_functions[] = { {"log_debug", lua_cb_log_debug}, {"log_error", lua_cb_log_error}, {"log_info", lua_cb_log_info},