From: oetiker Date: Tue, 14 Apr 2009 13:55:29 +0000 (+0000) Subject: make ruby bindings compile with newer ruby versions ... fix for #217 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=92a4616f9f8324af5343dba5e2849e98b69d73d8;p=rrdtool-all.git make ruby bindings compile with newer ruby versions ... fix for #217 patch provided by rrd trac user. git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@1791 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/bindings/ruby/main.c b/program/bindings/ruby/main.c index e911d9a1..07a9cd2a 100644 --- a/program/bindings/ruby/main.c +++ b/program/bindings/ruby/main.c @@ -27,7 +27,7 @@ string_arr string_arr_new(VALUE rb_strings) 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 */