|
Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)
|
"Typed" user data. More...
#include <rtypeddata.h>
Data Fields | |
| struct RBasic | basic |
| The part that all ruby objects have in common. | |
| VALUE | fields_obj |
| Direct reference to the slots that holds instance variables, if any. | |
| const VALUE | type |
| This is a const rb_data_type_t *const value, with the low bits set: | |
| 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 358 of file rtypeddata.h.
| struct RBasic RTypedData::basic |
The part that all ruby objects have in common.
Definition at line 361 of file rtypeddata.h.
| void* RTypedData::data |
Pointer to the actual C level struct that you want to wrap.
Definition at line 378 of file rtypeddata.h.
Referenced by rb_data_typed_object_zalloc().
| VALUE RTypedData::fields_obj |
Direct reference to the slots that holds instance variables, if any.
Definition at line 364 of file rtypeddata.h.
| const VALUE RTypedData::type |
This is a const rb_data_type_t *const value, with the low bits set:
1: Set if object is embedded.
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 375 of file rtypeddata.h.