X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=inline;f=bindings%2Fruby%2Fmain.c;h=408994f18bf6b3215093c02232e309950e976059;hb=4d2717c87ff413758caaa7942d211e642846b9b0;hp=d18b905c356d21c71de67de3895847f88ed73bde;hpb=24a1cb649dd3b5c5d93fa470ebfe4d88abb2af00;p=rrdtool.git diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index d18b905..408994f 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -144,6 +144,13 @@ VALUE rb_rrd_update( return rrd_call(rrd_update, args); } +VALUE rb_rrd_flush( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_cmd_flush, args); +} + /* Calls Returning Data via the Info Interface */ @@ -309,7 +316,7 @@ VALUE rb_rrd_last( string_arr_delete(a); RRD_CHECK_ERROR - return rb_funcall(rb_cTime, rb_intern("at"), 1, INT2FIX(last)); + return rb_funcall(rb_cTime, rb_intern("at"), 1, UINT2NUM(last)); } void Init_RRD( @@ -327,6 +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, "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);