Method: FFI::StructLayout::Field#offset

Defined in:
ext/ffi_c/StructLayout.c

#offsetNumeric

Get the field offset.

Returns:

  • (Numeric)


194
195
196
197
198
199
200
# File 'ext/ffi_c/StructLayout.c', line 194

static VALUE
struct_field_offset(VALUE self)
{
    StructField* field;
    TypedData_Get_Struct(self, StructField, &rbffi_struct_field_data_type, field);
    return UINT2NUM(field->offset);
}