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: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_PASS,T_DKIM_INVALID, T_RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1F60620282 for ; Fri, 16 Jun 2017 07:58:24 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 16FEF1207CA; Fri, 16 Jun 2017 16:58:23 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 4653A120788 for ; Fri, 16 Jun 2017 16:58:21 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=GSeXJKF4s8q+uL/OHT67UeRjrns=; b=O9IJ0/fs4Tu71C7qfo W1ePd10xHO2SGNfloyzolrI5MNpwsd4SNosx3trcOvlJCF20LnYgh76ZAHX15ovN DQMxTColjk2/Uu1ir9Sji8qOHTWT2Pt2R3pJqfW1MoOjWZKnfIp0KUqmfCSxwRYX Kuj4de6jUCdC2SJTZyyKIJkaE= Received: by filter0938p1mdw1.sendgrid.net with SMTP id filter0938p1mdw1-8355-59438F99-18 2017-06-16 07:58:17.311534842 +0000 UTC Received: from herokuapp.com (ec2-54-166-169-114.compute-1.amazonaws.com [54.166.169.114]) by ismtpd0005p1iad1.sendgrid.net (SG) with ESMTP id Iwql-hUmRMSJT222NsoZpg for ; Fri, 16 Jun 2017 07:58:17.297 +0000 (UTC) Date: Fri, 16 Jun 2017 07:58:17 +0000 From: ko1@atdot.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 56731 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13381 X-Redmine-Issue-Author: eagletmt X-Redmine-Issue-Assignee: ko1 X-Redmine-Sender: ko1 X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6frwSw1BjLJmMBxdsOITU7yy9DKgm+jwKyyf TJpnplTrswq9j3w/McOeWpANIHUvdHJTi7YN3cVYRCyaK8kQVU0DVmyWRUVADuYcdVCVG8aoBHKDhv wXTUXfth/xNiDLLlimO8lydj8S82rIqzoa24 X-ML-Name: ruby-core X-Mail-Count: 81703 Subject: [ruby-core:81703] [Ruby trunk Feature#13381][Assigned] [PATCH] Expose rb_fstring and its family to C extensions X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #13381 has been updated by ko1 (Koichi Sasada). Status changed from Feedback to Assigned Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions https://bugs.ruby-lang.org/issues/13381#change-65393 * Author: eagletmt (Kohei Suzuki) * Status: Assigned * Priority: Normal * Assignee: ko1 (Koichi Sasada) * Target version: ---------------------------------------- https://github.com/ruby/ruby/pull/1559 Currently, C extensions cannot use fstrings. I'd like to use `rb_fstring_cstr` instead of `rb_str_new_cstr` for static strings in C extensions to avoid excess allocation. I think there's several use cases. - https://github.com/k0kubun/hamlit/blob/v2.8.0/ext/hamlit/hamlit.c#L508-L512 - https://bitbucket.org/ged/ruby-pg/src/e5eb92cca97abc0c6fc168acfad993c2ad314589/ext/pg_connection.c?at=v0.20.0&fileviewer=file-view-default#pg_connection.c-3679 - https://bitbucket.org/ged/ruby-pg/src/e5eb92cca97abc0c6fc168acfad993c2ad314589/ext/pg_copy_coder.c?at=v0.20.0&fileviewer=file-view-default#pg_copy_coder.c-38 -- https://bugs.ruby-lang.org/