diff --git a/bindings/ruby/main.c b/bindings/ruby/main.c
index 40ed33a6e1feca87eab3c3dc22caaa1827742159..0e022e45d2722c17bcf313ae3080b4b4eb6ec1b5 100644 (file)
--- a/bindings/ruby/main.c
+++ b/bindings/ruby/main.c
-/* $Id: main.c 1411 2008-06-08 16:47:22Z oetiker $
+/* $Id: main.c 1700 2008-12-08 16:07:27Z oetiker $
* Substantial penalty for early withdrawal.
*/
RRD_CHECK_ERROR result = rb_hash_new();
+ p = data;
while (data) {
VALUE key = rb_str_new2(data->key);
break;
case RD_I_STR:
rb_hash_aset(result, key, rb_str_new2(data->value.u_str));
- rrd_freemem(data->value.u_str);
break;
case RD_I_BLO:
rb_hash_aset(result, key,
rb_str_new(data->value.u_blo.ptr,
data->value.u_blo.size));
- rrd_freemem(data->value.u_blo.ptr);
break;
}
- p = data;
data = data->next;
- rrd_freemem(p);
}
+ rrd_info_free(p);
return result;
}
VALUE self,
VALUE args)
{
- return rrd_infocall(rrd_info, args);
+ return rb_rrd_infocall(rrd_info, args);
}
VALUE rb_rrd_updatev(
VALUE self,
VALUE args)
{
- return rrd_infocall(rrd_update_v, args);
+ return rb_rrd_infocall(rrd_update_v, args);
}
VALUE rb_rrd_graphv(
VALUE self,
VALUE args)
{
- return rrd_infocall(rrd_graph_v, args);
+ return rb_rrd_infocall(rrd_graph_v, args);
}
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(