diff options
author | Wayne Meissner <wmeissner@gmail.com> | 2012-12-29 18:20:43 +1000 |
---|---|---|
committer | Wayne Meissner <wmeissner@gmail.com> | 2013-01-03 19:57:57 +1000 |
commit | 07a97ad17e79b4782fb480a541be5a97e1bc9cd0 (patch) | |
tree | f5afa7e1f673f5ac42d73d76aae4bacfebf893df | |
parent | c0f3cd2c3c0c6dc05123bbbd67cf2b0cd8d849eb (diff) | |
download | ffi-07a97ad17e79b4782fb480a541be5a97e1bc9cd0.tar.gz |
Correct some rb_global_variable() calls that were passing in stack addresses.
-rw-r--r-- | ext/ffi_c/Type.c | 2 | ||||
-rw-r--r-- | ext/ffi_c/ffi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/ffi_c/Type.c b/ext/ffi_c/Type.c index bec7d9b..6349a61 100644 --- a/ext/ffi_c/Type.c +++ b/ext/ffi_c/Type.c @@ -39,6 +39,7 @@ static void builtin_type_free(BuiltinType *); VALUE rbffi_TypeClass = Qnil; static VALUE classBuiltinType = Qnil; +static VALUE moduleNativeType = Qnil; static VALUE typeMap = Qnil, sizeMap = Qnil; static ID id_find_type = 0, id_type_size = 0, id_size = 0; @@ -243,7 +244,6 @@ rbffi_Type_Find(VALUE name) void rbffi_Type_Init(VALUE moduleFFI) { - VALUE moduleNativeType; /* * Document-class: FFI::Type * This class manages C types. diff --git a/ext/ffi_c/ffi.c b/ext/ffi_c/ffi.c index 51a5948..4490cc6 100644 --- a/ext/ffi_c/ffi.c +++ b/ext/ffi_c/ffi.c @@ -56,7 +56,7 @@ Init_ffi_c(void) { * This module embbed type constants from {FFI::NativeType}. */ rbffi_FFIModule = moduleFFI = rb_define_module("FFI"); - rb_global_variable(&moduleFFI); + rb_global_variable(&rbffi_FFIModule); /* FFI::Type needs to be initialized before most other classes */ |