From 0e9c2aefd2df983dc79959eb28075efaf7800da0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 3 Mar 2017 20:53:06 +0000 Subject: remove rb_str_modify workaround Every supported Ruby implementation has a rb_str_modify wrapper. --- ext/kcar/ext_help.h | 4 ---- ext/kcar/extconf.rb | 1 - 2 files changed, 5 deletions(-) diff --git a/ext/kcar/ext_help.h b/ext/kcar/ext_help.h index d227737..a0e21e2 100644 --- a/ext/kcar/ext_help.h +++ b/ext/kcar/ext_help.h @@ -16,10 +16,6 @@ # endif #endif /* ! defined(OFFT2NUM) */ -#ifndef HAVE_RB_STR_MODIFY -# define rb_str_modify(x) do {} while (0) -#endif /* ! defined(HAVE_RB_STR_MODIFY) */ - static inline int str_cstr_eq(VALUE val, const char *ptr, long len) { return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len)); diff --git a/ext/kcar/extconf.rb b/ext/kcar/extconf.rb index 3585125..7ab5b4b 100644 --- a/ext/kcar/extconf.rb +++ b/ext/kcar/extconf.rb @@ -5,7 +5,6 @@ dir_config("kcar") have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h") have_macro("SIZEOF_LONG", "ruby.h") or check_sizeof("long", "sys/types.h") -have_func("rb_str_modify", "ruby.h") # -fPIC is needed for Rubinius, MRI already uses it regardless with_cflags($CFLAGS + " -fPIC ") do -- cgit v1.2.3-24-ge0c7