X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=bindings%2Fpython%2Frrdtoolmodule.c;h=a2647b50f788f908e44571625581e617ce3a6ef3;hb=8d6912995d9641a27ef051ad4234883c89464ca0;hp=85f63c7eabb56deb6dbbfda79e5aba72a472b70d;hpb=fa908e68adb7ba747ef86c2cc62edc103b07aa2d;p=rrdtool.git diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c index 85f63c7..a2647b5 100644 --- a/bindings/python/rrdtoolmodule.c +++ b/bindings/python/rrdtoolmodule.c @@ -37,7 +37,9 @@ # define UNUSED(x) x #endif -static const char *__version__ = "$Revision: 1.14 $"; + +#include "../../rrd_config.h" +static const char *__version__ = PACKAGE_VERSION; #include "Python.h" #include "../../src/rrd_tool.h" @@ -557,11 +559,11 @@ static PyObject *PyRRD_updatev( return r; } -static char PyRRD_flush__doc__[] = +static char PyRRD_flushcached__doc__[] = "flush(args..): flush RRD files from memory\n" " flush [--daemon address] file [file ...]"; -static PyObject *PyRRD_flush( +static PyObject *PyRRD_flushcached( PyObject UNUSED(*self), PyObject * args) { @@ -569,10 +571,10 @@ static PyObject *PyRRD_flush( int argc; char **argv; - if (create_args("flush", args, &argc, &argv) < 0) + if (create_args("flushcached", args, &argc, &argv) < 0) return NULL; - if (rrd_cmd_flush(argc, argv) != 0) { + if (rrd_flushcached(argc, argv) != 0) { PyErr_SetString(ErrorObject, rrd_get_error()); rrd_clear_error(); r = NULL; @@ -600,7 +602,7 @@ static PyMethodDef _rrdtool_methods[] = { meth("info", PyRRD_info, PyRRD_info__doc__), meth("graphv", PyRRD_graphv, PyRRD_graphv__doc__), meth("updatev", PyRRD_updatev, PyRRD_updatev__doc__), - meth("flush", PyRRD_flush, PyRRD_flush__doc__), + meth("flushcached", PyRRD_flushcached, PyRRD_flushcached__doc__), {NULL, NULL, 0, NULL} };