diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2010-05-22 18:10:39 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2010-05-22 18:10:39 +1000 |
commit | 3f791f2c360071be5a002d1ff7ef3f6d1b237295 (patch) | |
tree | 8a797b44620dfabc7c00d00f65cba29feeb6fb6c /ext/ffi_c/ffi.c | |
parent | 02bc56f88e9f15858d82562ae0f1fed404e86cc7 (diff) | |
download | ffi-3f791f2c360071be5a002d1ff7ef3f6d1b237295.tar.gz |
Add StructByReference for converting pointer-to-struct parameter/return values
Diffstat (limited to 'ext/ffi_c/ffi.c')
-rw-r--r-- | ext/ffi_c/ffi.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/ffi_c/ffi.c b/ext/ffi_c/ffi.c index df88575..1395290 100644 --- a/ext/ffi_c/ffi.c +++ b/ext/ffi_c/ffi.c @@ -38,6 +38,7 @@ #include "AutoPointer.h" #include "Struct.h" #include "StructByValue.h" +#include "StructByReference.h" #include "DynamicLibrary.h" #include "Platform.h" #include "Types.h" @@ -60,8 +61,12 @@ Init_ffi_c(void) { rbffi_FFIModule = moduleFFI = rb_define_module("FFI"); rb_global_variable(&moduleFFI); + // FFI::Type needs to be initialized before most other classes rbffi_Type_Init(moduleFFI); + + rbffi_DataConverter_Init(moduleFFI); + rbffi_ArrayType_Init(moduleFFI); rbffi_LastError_Init(moduleFFI); rbffi_Call_Init(moduleFFI); @@ -75,12 +80,11 @@ Init_ffi_c(void) { rbffi_MemoryPointer_Init(moduleFFI); rbffi_Buffer_Init(moduleFFI); rbffi_StructByValue_Init(moduleFFI); + rbffi_StructByReference_Init(moduleFFI); rbffi_Struct_Init(moduleFFI); rbffi_DynamicLibrary_Init(moduleFFI); rbffi_Variadic_Init(moduleFFI); rbffi_Types_Init(moduleFFI); - - rbffi_DataConverter_Init(moduleFFI); rbffi_MappedType_Init(moduleFFI); } |