diff --git a/ext/ffi_c/Type.c b/ext/ffi_c/Type.c index 034482f2c..bc8285717 100644 --- a/ext/ffi_c/Type.c +++ b/ext/ffi_c/Type.c @@ -235,24 +235,6 @@ rbffi_Type_Lookup(VALUE name) return Qnil; } -/** - * rbffi_Type_Find() is like rbffi_Type_Lookup, but an error is raised if the - * type is not found. - */ -VALUE -rbffi_Type_Find(VALUE name) -{ - VALUE rbType = rbffi_Type_Lookup(name); - - if (!RTEST(rbType)) { - VALUE s = rb_inspect(name); - rb_raise(rb_eTypeError, "invalid type, %s", RSTRING_PTR(s)); - RB_GC_GUARD(s); - } - - return rbType; -} - void rbffi_Type_Init(VALUE moduleFFI) { diff --git a/ext/ffi_c/Type.h b/ext/ffi_c/Type.h index d5522ee8a..b81995acf 100644 --- a/ext/ffi_c/Type.h +++ b/ext/ffi_c/Type.h @@ -52,7 +52,6 @@ struct Type_ { extern VALUE rbffi_TypeClass; extern VALUE rbffi_Type_Lookup(VALUE type); -extern VALUE rbffi_Type_Find(VALUE type); #ifdef __cplusplus }