From b809784817649817c3e53fa000f57504446caef9 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sat, 19 Oct 2019 16:10:47 -0700 Subject: [ruby/fiddle] Remove taint support (#21) Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/fiddle/commit/18d6fb6915 --- ext/fiddle/handle.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ext/fiddle/handle.c') diff --git a/ext/fiddle/handle.c b/ext/fiddle/handle.c index e727ccfd00..700924afb5 100644 --- a/ext/fiddle/handle.c +++ b/ext/fiddle/handle.c @@ -1,8 +1,6 @@ #include #include -#define SafeStringValueCStr(v) (rb_check_safe_obj(rb_string_value(&v)), StringValueCStr(v)) - VALUE rb_cHandle; struct dl_handle { @@ -145,11 +143,11 @@ rb_fiddle_handle_initialize(int argc, VALUE argv[], VALUE self) cflag = RTLD_LAZY | RTLD_GLOBAL; break; case 1: - clib = NIL_P(lib) ? NULL : SafeStringValueCStr(lib); + clib = NIL_P(lib) ? NULL : StringValueCStr(lib); cflag = RTLD_LAZY | RTLD_GLOBAL; break; case 2: - clib = NIL_P(lib) ? NULL : SafeStringValueCStr(lib); + clib = NIL_P(lib) ? NULL : StringValueCStr(lib); cflag = NUM2INT(flag); break; default: @@ -319,7 +317,7 @@ fiddle_handle_sym(void *handle, VALUE symbol) # define CHECK_DLERROR #endif void (*func)(); - const char *name = SafeStringValueCStr(symbol); + const char *name = StringValueCStr(symbol); #ifdef HAVE_DLERROR dlerror(); -- cgit v1.2.1