From 96bf421ad8a39c766697539678458d2a544f5444 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 7 Jan 2019 23:32:36 +0100 Subject: [PATCH] Remove no longer used rbffi_Type_Find() --- ext/ffi_c/Type.c | 18 ------------------ ext/ffi_c/Type.h | 1 - 2 files changed, 19 deletions(-) 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 }