diff options
Diffstat (limited to 'ext/ffi_c/Type.c')
-rw-r--r-- | ext/ffi_c/Type.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/ffi_c/Type.c b/ext/ffi_c/Type.c index 9bf5681..a94c009 100644 --- a/ext/ffi_c/Type.c +++ b/ext/ffi_c/Type.c @@ -128,6 +128,8 @@ type_initialize(VALUE self, VALUE value) rb_raise(rb_eArgError, "wrong type"); } + rb_obj_freeze(self); + return self; } @@ -192,6 +194,8 @@ builtin_type_new(VALUE klass, int nativeType, ffi_type* ffiType, const char* nam type->type.nativeType = nativeType; type->type.ffiType = ffiType; + rb_obj_freeze(obj); + return obj; } |