From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id E13311B61D59 for ; Wed, 29 Mar 2017 13:53:08 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 7FF94B5D85C for ; Wed, 29 Mar 2017 14:29:21 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id DB0FD18CC7ED for ; Wed, 29 Mar 2017 14:29:21 +0900 (JST) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 8D316120704; Wed, 29 Mar 2017 14:29:20 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org 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 450451206A6 for ; Wed, 29 Mar 2017 14:29:17 +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=mE287PDcD+vDs/zauwvdjHwV9/k=; b=FJnmFZn8+WULRGG+tQ cBnBkFdZlrJYakmdMl+eXRcMlU+83DNcFvO5a9s/OiKYTFTsvRyqx5qXfkee2Avp NA4wpJnKrSJQzjlEki+kN2VbMDymP1pFJoUxaZFUmHaWz+EgqhliPlMolX7S3u9V P5MfxrUcHL8BBS/vSHMGxGZwg= Received: by filter0475p1mdw1.sendgrid.net with SMTP id filter0475p1mdw1-19299-58DB4628-1D 2017-03-29 05:29:12.786071581 +0000 UTC Received: from herokuapp.com (ec2-54-205-145-50.compute-1.amazonaws.com [54.205.145.50]) by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id VzaKIMbbTH2VsTnJHXs3CQ for ; Wed, 29 Mar 2017 05:29:12.715 +0000 (UTC) Date: Wed, 29 Mar 2017 05:29:12 +0000 From: eagletmt@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 55418 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13381 X-Redmine-Issue-Author: eagletmt X-Redmine-Sender: eagletmt 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS7PP9b/QTf+JiqiPOo3NiDpgusgj9MXmZ7OjA HooEVLktVwhX69cjidamBZDO2OmYKDDmUliClzcIcj+nbzQ/AEa/l0iX5dCX9W9MNQCsxypj74Avqa /wPNhE2cOwMMrh0jdcqjW6nkliAlxyTIuf/Bj6/Z8qrdUKrP9/ZRlYTHgw== X-ML-Name: ruby-core X-Mail-Count: 80447 Subject: [ruby-core:80447] [Ruby trunk Feature#13381] [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 reported by eagletmt (Kohei Suzuki). ---------------------------------------- Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions https://bugs.ruby-lang.org/issues/13381 * Author: eagletmt (Kohei Suzuki) * Status: Open * Priority: Normal * Assignee: * 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/