Undocumented Macro DATA_PTR
VALUE my_obj; MyStruct my_struct; my_struct = ALLOC(MyStruct); DATA_PTR(my_obj) = my_struct;
Use this after initially assigning a pointer with
Data_Make_Struct. Which means the same free and mark function pointers will still apply.
Note: While the
DATA_PTR macro isn’t touched in the PickAxe II, I’ve found its coverage of the Ruby API to be indispensable. Nuances such as proper use of
StringValue and the difference between 1.6 and 1.8 object allocation are essential.