From: ts Date: 2002-08-13T23:05:24+09:00 Subject: Re: Data_Make_Struct Considered Dangerous? >>>>> "W" == William Djaja Tjokroaminata writes: W> Right now, the solution is simply to add this line: W> .... ptr-> data2 = Qnil; ptr-> data2 = Data_Make_Struct (cInner...); W> .... No, this is not the solution. If you make a right use of Data_Make_Struct ptr->data2 == NULL before the call to Data_Make_Struct() and you can test this in the mark functions. W> 1) NEVER use Data_Make_Struct. Use Data_Wrap_Struct instead. W> 2) NEVER use Ruby's ALLOC. Use, at least, C's malloc instead. Don't say this : this is *stupid* First learn how to use the ruby API, and remove *your* bugs in the source of your extension before trying to say such stupidities. Guy Decoux