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 03F001B61D59 for ; Wed, 29 Mar 2017 14:00:35 +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 A25A3B5D85C for ; Wed, 29 Mar 2017 14:36:47 +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 097C618D1D95 for ; Wed, 29 Mar 2017 14:36:48 +0900 (JST) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 40E3D120731; Wed, 29 Mar 2017 14:36:47 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o1678916x28.outbound-mail.sendgrid.net (o1678916x28.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 80D7D1206A6 for ; Wed, 29 Mar 2017 14:36:44 +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=eIDZ+xM/C1Ud7PI/rvN4vmyQhK0=; b=BbiMpePIqfZe/rcpVp 85Jy77l2UJaK6reXqid9WkFFYaD2orwV6LzC07VDRvkJIYabphENE9McJoI7So2A LoGUmADhYxWyyAitXCZgXSyuDBheIH5wQCECA7lio4EHz5jkSO1iVZLYlZvcWqah MRyqY1YANFTqoTa6RjRz1lptg= Received: by filter0552p1mdw1.sendgrid.net with SMTP id filter0552p1mdw1-22985-58DB47E8-18 2017-03-29 05:36:40.80410442 +0000 UTC Received: from herokuapp.com (ec2-54-224-114-135.compute-1.amazonaws.com [54.224.114.135]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id Li-6MAabSXuAaolHrryNbw for ; Wed, 29 Mar 2017 05:36:40.766 +0000 (UTC) Date: Wed, 29 Mar 2017 05:36:40 +0000 From: ko1@atdot.net To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 55419 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 13381 X-Redmine-Issue-Author: eagletmt 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS5eYhZW1jSUL1IIHmRyHIJr6ch2AMHWC34h70 h1ktopZs7NSt3vpwUgdZayCL2huITBew2aiA4sJ9LarcEiE+//hpHRZ3kxJJJdvFpzBT2PqiOZ2+Ob pK9xz1I3WsR5Yso79b+IaMOyUc/540rs3mep X-ML-Name: ruby-core X-Mail-Count: 80448 Subject: [ruby-core:80448] [Ruby trunk Feature#13381][Feedback] [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 Open to Feedback I can understand use cases but we shouldn't expose the name "fstring". ---------------------------------------- Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions https://bugs.ruby-lang.org/issues/13381#change-63938 * Author: eagletmt (Kohei Suzuki) * Status: Feedback * 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/