From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS60404 5.2.64.0/20 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00, RCVD_IN_MSPIKE_BL,RCVD_IN_MSPIKE_ZBI,RCVD_IN_XBL,RDNS_NONE,SPF_FAIL, SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (unknown [5.2.75.25]) by dcvr.yhbt.net (Postfix) with ESMTP id 19C632027F for ; Fri, 3 Mar 2017 20:53:32 +0000 (UTC) From: Eric Wong To: kcar-public@bogomips.org Subject: [PATCH 4/5] remove rb_str_modify workaround Date: Fri, 3 Mar 2017 20:53:06 +0000 Message-Id: <20170303205307.2275-5-e@80x24.org> In-Reply-To: <20170303205307.2275-1-e@80x24.org> References: <20170303205307.2275-1-e@80x24.org> List-Id: 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 -- EW