ext/nmatrix/data/data.cpp in nmatrix-0.1.0.rc4 vs ext/nmatrix/data/data.cpp in nmatrix-0.1.0.rc5
- old
+ new
@@ -281,14 +281,14 @@
* Allocate and return a piece of data of the correct dtype, converted from a
* given RubyObject.
*/
void* rubyobj_to_cval(VALUE val, nm::dtype_t dtype) {
size_t size = DTYPE_SIZES[dtype];
- NM_CONSERVATIVE(nm_register_value(val));
+ NM_CONSERVATIVE(nm_register_value(&val));
void* ret_val = NM_ALLOC_N(char, size);
rubyval_to_cval(val, dtype, ret_val);
- NM_CONSERVATIVE(nm_unregister_value(val));
+ NM_CONSERVATIVE(nm_unregister_value(&val));
return ret_val;
}
void nm_init_data() {