X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=bindings%2Fruby%2Fmain.c;h=355625f9c2ec5d87b6124b1ec05cca1243decfdf;hb=88f9f8473259baa892d8819b7cf374c0e561103f;hp=551203bf8626a10ce1159a113fb1275635646edf;hpb=30ae34dc4cb5e8c94fb1f13b0a089494256649af;p=rrdtool.git diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c index 551203b..355625f 100644 --- a/bindings/ruby/main.c +++ b/bindings/ruby/main.c @@ -38,7 +38,7 @@ string_arr string_arr_new( int i; Check_Type(rb_strings, T_ARRAY); - a.len = RARRAY(rb_strings)->len + 1; + a.len = RARRAY_LEN(rb_strings) + 1; a.strings = malloc(a.len * sizeof(char *)); a.strings[0] = "dummy"; /* first element is a dummy element */ @@ -144,6 +144,13 @@ VALUE rb_rrd_update( return rrd_call(rrd_update, args); } +VALUE rb_rrd_flushcached( + VALUE self, + VALUE args) +{ + return rrd_call(rrd_flushcached, args); +} + /* Calls Returning Data via the Info Interface */ @@ -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, "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);