Ara.T.Howard wrote: > static VALUE > convertgslmatrixToRubyMatrix (gsl_matrix * dm) > { > int i, j; > VALUE result; > VALUE rows = rb_ary_new (); > for (i = 0; i < dm->size1; i += 1) > { > VALUE currow = rb_ary_new (); > rb_gc_mark (currow); > rb_ary_push (rows, currow); > for (j = 0; j < dm->size2; j += 1) > { > double val = gsl_matrix_get (dm, i, j); > VALUE rval = rb_float_new (val); > rb_ary_push (currow, rval); > } > } > result = rb_funcall (cMatrix, rb_intern ("rows"), 2, rows, Qnil); > return result; > } I don¡Çt understand why you need to rb_gc_mark those values. They¡Çre pointed to by objects on the stack, so a GC sweep won¡Çt remove them. Neither of the volatile specifiers in the original are needed either, as you write (or I am definitely missing something). I don¡Çt see how they would be optimized away anyway. Well, actually, the 'result' variable should be optimized away :-), just return the result of the rb_funcall immediately. Perhaps I don¡Çt understand what you want to do here, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}