diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-10-19 16:10:47 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-10-24 19:34:49 +0900 |
commit | b809784817649817c3e53fa000f57504446caef9 (patch) | |
tree | f278724c35c5d09bec3fd52049746dffced65c73 /ext/fiddle/handle.c | |
parent | ce6caade7c57a505f73086ccd7b33c14f7715f22 (diff) | |
download | ruby-b809784817649817c3e53fa000f57504446caef9.tar.gz |
[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
Diffstat (limited to 'ext/fiddle/handle.c')
-rw-r--r-- | ext/fiddle/handle.c | 8 |
1 files changed, 3 insertions, 5 deletions
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 <ruby.h> #include <fiddle.h> -#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(); |