From: Michael Neumann Date: 2008-01-02T06:59:25+09:00 Subject: Re: ruby 1.9 porting problem Jeff Davis wrote: > I am having problems porting my extension to 1.9. > > I'm doing something like: > > static VALUE my_alloc(VALUE klass) > { > return Data_Wrap_Struct(klass, NULL, my_free, NULL); > } > ... > static VALUE my_init(int argc, VALUE *argv, VALUE self) > { > ... > Check_Type(self,T_DATA); > DATA_PTR(self) = my_var; That generally should work. Have you tried with a non-NULL value in Data_Wrap_Struct? Have you tried a 0-ary method first? static VALUE my_init(VALUE self) { ... Check_Type(self,T_DATA); DATA_PTR(self) = my_var; Regards, Michael