X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=bindings%2Flua%2Frrdlua.c;h=a73318409d993301c50d18949f402a0acc45d8df;hp=bef3e66421d53535244ab9a6417904a5fd369db5;hb=954e4ccde1346c9951aaa3d5c077b0ffc7fd93b6;hpb=e0fde57e050da8ae29bf1a95aee958dfff2510e2 diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c index bef3e66..a733184 100644 --- a/bindings/lua/rrdlua.c +++ b/bindings/lua/rrdlua.c @@ -27,11 +27,11 @@ #include "../../src/rrd_tool.h" #ifdef LUA50 - #ifdef HAVE_COMPAT51 - #include "compat-5.1.h" - #else - #include "compat-5.1r5/compat-5.1.h" - #endif +#ifdef HAVE_COMPAT51 +#include "compat-5.1.h" +#else +#include "compat-5.1r5/compat-5.1.h" +#endif #endif extern void rrd_freemem(void *mem); @@ -292,6 +292,12 @@ lua_rrd_graph (lua_State * L) return 3; } +static int +lua_rrd_flushcached(lua_State *L) +{ + return rrd_common_call(L, "flushcached", rrd_flushcached); +} + #if defined(DINF) static int lua_rrd_info (lua_State * L) @@ -347,6 +353,7 @@ static const struct luaL_reg rrd[] = { {"restore", lua_rrd_restore}, {"tune", lua_rrd_tune}, {"update", lua_rrd_update}, + {"flushcached", lua_rrd_flushcached}, #if defined(DINF) {"info", lua_rrd_info}, {"updatev", lua_rrd_updatev},