Method: FFI::StructByReference#initialize
- Defined in:
- ext/ffi_c/StructByReference.c
#initialize(struc_class) ⇒ self
A new instance of StructByReference.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'ext/ffi_c/StructByReference.c', line 78 static VALUE sbr_initialize(VALUE self, VALUE rbStructClass) { StructByReference* sbr = NULL; if (!rb_class_inherited_p(rbStructClass, rbffi_StructClass)) { rb_raise(rb_eTypeError, "wrong type (expected subclass of FFI::Struct)"); } Data_Get_Struct(self, StructByReference, sbr); sbr->rbStructClass = rbStructClass; return self; } |