|
Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)
|
"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.