Index: main.c
===================================================================
--- main.c (revision 8873)
+++ main.c (working copy)
@@ -129,11 +130,12 @@
}
free(raw_data);
- result = rb_ary_new2(4);
- rb_ary_store(result, 0, INT2FIX(start));
- rb_ary_store(result, 1, INT2FIX(end));
+ result = rb_ary_new2(5);
+ rb_ary_store(result, 0, INT2NUM(start));
+ rb_ary_store(result, 1, INT2NUM(end));
rb_ary_store(result, 2, names);
rb_ary_store(result, 3, data);
+ rb_ary_store(result, 4, INT2FIX(step));
The solution to the corruption is to use the INT2NUM macro, not
INT2FIX. The latter can lose data on large integers.
Please note the diff above also adds the step value to the returned
results. This would be a very useful addition to the API for us.
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users