From: Lenny Date: 2003-03-30T02:28:41+09:00 Subject: C-API: Setting a Ruby-Object in a wrapped C struct Hi, i have a Ruby class which uses a wrapped C struct for housekeeping it's members: struct { VALUE bar; } foo; and use the following function for the class methode "bar()": static VALUE getBar( VALUE self ) { foo* p; Data_Get_Struct( self, foo, p ); return p->bar; } Now i don't know how to write a corresponding "bar=()" function. Can anybody give me a hint? iv_set_var() seems to be unnecessary inefficient. Thanks Lenny