Ruby 3.3.0p0 (2023-12-25 revision 5124f9ac7513eb590c37717337c430cb93caa151)
|
"Typed" user data. More...
#include <rtypeddata.h>
Data Fields | |
struct RBasic | basic |
The part that all ruby objects have in common. | |
const rb_data_type_t *const | type |
This field stores various information about how Ruby should handle a data. | |
const VALUE | typed_flag |
This has to be always 1. | |
void * | data |
Pointer to the actual C level struct that you want to wrap. | |
"Typed" user data.
By using this, extension libraries can wrap a C struct to make it visible from Ruby. For instance if you have a struct timeval
, and you want users to use it,
Definition at line 350 of file rtypeddata.h.
struct RBasic RTypedData::basic |
The part that all ruby objects have in common.
Definition at line 353 of file rtypeddata.h.
void* RTypedData::data |
Pointer to the actual C level struct that you want to wrap.
Definition at line 370 of file rtypeddata.h.
const rb_data_type_t* const RTypedData::type |
This field stores various information about how Ruby should handle a data.
This roughly resembles a Ruby level class (apart from method definition etc.)
Definition at line 360 of file rtypeddata.h.
Referenced by rb_data_typed_object_alloc(), and rb_data_typed_object_make().
const VALUE RTypedData::typed_flag |
This has to be always 1.
Definition at line 367 of file rtypeddata.h.