Ruby
3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
|
#include <rdata.h>
Data Fields | |
struct RBasic | basic |
Basic part, including flags and class. More... | |
RUBY_DATA_FUNC | dmark |
This function is called when the object is experiencing GC marks. More... | |
RUBY_DATA_FUNC | dfree |
This function is called when the object is no longer used. More... | |
void * | data |
Pointer to the actual C level struct that you want to wrap. More... | |
Old "untyped" user data. It has roughly the same usage as struct RTypedData, but lacked several features such as support for compaction GC. Use of this struct is not recommended any longer. If it is dead necessary, please inform the core devs about your usage.
struct RBasic RData::basic |
void* RData::data |
RUBY_DATA_FUNC RData::dfree |
RUBY_DATA_FUNC RData::dmark |
This function is called when the object is experiencing GC marks.
If it contains references to other Ruby objects, you need to mark them also. Otherwise GC will smash your data.