From: Claudio Fiorini Date: 2009-01-23T05:10:40+09:00 Subject: [ruby-core:21526] Data_Wrap_Struct question about mark and free function Hi all, first of all sorry if my question doesn't deserve an answer, i'm writing an extension to use odbtp, http://odbtp.sourceforge.net , and before to start i was reading the postgresql extension and i got in Data_Set_Struct #define Data_Set_Struct(obj, ptr) do { \ Check_Type(obj, T_DATA); \ DATA_PTR(obj) = ptr; \ } while(0); so in my source i tried to use but i got this error: error: expected expression before 'do' why happen? after this i switched to Data_Wrap_Struct using NULL without doing the mark and free function. Now my question is what the big difference with the use of the mark and free function? Thanks claudio