[rrd-developers] [PATCH 2/2] Update binding function names.

kevin brintnall kbrint at rufus.net
Tue May 26 15:45:01 CEST 2009


"RRDs::<func>", etc. should always correspond to "rrdtool <func>".
---
 bindings/lua/rrdlua.c           |    6 +++---
 bindings/perl-shared/RRDs.pm    |    2 +-
 bindings/perl-shared/RRDs.xs    |    2 +-
 bindings/python/rrdtoolmodule.c |    8 ++++----
 bindings/ruby/main.c            |    4 ++--
 bindings/tcl/tclrrd.c           |    4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
index a93159f..a733184 100644
--- a/bindings/lua/rrdlua.c
+++ b/bindings/lua/rrdlua.c
@@ -293,9 +293,9 @@ lua_rrd_graph (lua_State * L)
 }
 
 static int
-lua_rrd_flush(lua_State *L)
+lua_rrd_flushcached(lua_State *L)
 {
-  return rrd_common_call(L, "flush", rrd_flushcached);
+  return rrd_common_call(L, "flushcached", rrd_flushcached);
 }
 
 #if defined(DINF)
@@ -353,7 +353,7 @@ static const struct luaL_reg rrd[] = {
   {"restore", lua_rrd_restore},
   {"tune", lua_rrd_tune},
   {"update", lua_rrd_update},
-  {"flush", lua_rrd_flush},
+  {"flushcached", lua_rrd_flushcached},
 #if defined(DINF)
   {"info", lua_rrd_info},
   {"updatev", lua_rrd_updatev},
diff --git a/bindings/perl-shared/RRDs.pm b/bindings/perl-shared/RRDs.pm
index 3f88c92..33dd529 100644
--- a/bindings/perl-shared/RRDs.pm
+++ b/bindings/perl-shared/RRDs.pm
@@ -33,7 +33,7 @@ RRDs - Access RRDtool as a shared module
   RRDs::times(start, end)
   RRDs::dump ...
   RRDs::restore ...
-  RRDs::flush ...
+  RRDs::flushcached ...
 
 =head1 DESCRIPTION
 
diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs
index a32fc57..029b3be 100644
--- a/bindings/perl-shared/RRDs.xs
+++ b/bindings/perl-shared/RRDs.xs
@@ -445,7 +445,7 @@ rrd_restore(...)
                RETVAL
 
 int
-rrd_flush(...)
+rrd_flushcached(...)
 	PROTOTYPE: @
 	PREINIT:
 	int i;
diff --git a/bindings/python/rrdtoolmodule.c b/bindings/python/rrdtoolmodule.c
index 9bf226b..8eba8f9 100644
--- a/bindings/python/rrdtoolmodule.c
+++ b/bindings/python/rrdtoolmodule.c
@@ -557,11 +557,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,7 +569,7 @@ 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_flushcached(argc, argv) != 0) {
@@ -600,7 +600,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}
 };
 
diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c
index f535827..355625f 100644
--- a/bindings/ruby/main.c
+++ b/bindings/ruby/main.c
@@ -144,7 +144,7 @@ VALUE rb_rrd_update(
     return rrd_call(rrd_update, args);
 }
 
-VALUE rb_rrd_flush(
+VALUE rb_rrd_flushcached(
     VALUE self,
     VALUE args)
 {
@@ -334,7 +334,7 @@ void Init_RRD(
     rb_define_module_function(mRRD, "restore", rb_rrd_restore, -2);
     rb_define_module_function(mRRD, "tune", rb_rrd_tune, -2);
     rb_define_module_function(mRRD, "update", rb_rrd_update, -2);
-    rb_define_module_function(mRRD, "flush", rb_rrd_flush, -2);
+    rb_define_module_function(mRRD, "flushcached", rb_rrd_flushcached, -2);
     rb_define_module_function(mRRD, "info", rb_rrd_info, -2);
     rb_define_module_function(mRRD, "updatev", rb_rrd_updatev, -2);
     rb_define_module_function(mRRD, "graphv", rb_rrd_graphv, -2);
diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c
index aa17c50..c64140f 100644
--- a/bindings/tcl/tclrrd.c
+++ b/bindings/tcl/tclrrd.c
@@ -231,7 +231,7 @@ static int Rrd_Dump(
 }
 
 /* Thread-safe version */
-static int Rrd_Flush(
+static int Rrd_Flushcached(
     ClientData __attribute__((unused)) clientData,
     Tcl_Interp *interp,
     int argc,
@@ -650,7 +650,7 @@ typedef struct {
 static CmdInfo rrdCmds[] = {
     {"Rrd::create", Rrd_Create, 1}, /* Thread-safe version */
     {"Rrd::dump", Rrd_Dump, 0}, /* Thread-safe version */
-    {"Rrd::flush", Rrd_Flush, 0},
+    {"Rrd::flushcached", Rrd_Flushcached, 0},
     {"Rrd::last", Rrd_Last, 0}, /* Thread-safe version */
     {"Rrd::lastupdate", Rrd_Lastupdate, 0}, /* Thread-safe version */
     {"Rrd::update", Rrd_Update, 1}, /* Thread-safe version */
-- 
1.6.2.2



More information about the rrd-developers mailing list