From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1350E1F5AE for ; Fri, 17 Jul 2020 09:23:05 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id AB0D5120A41; Fri, 17 Jul 2020 18:22:35 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 6E45C1209DB for ; Fri, 17 Jul 2020 18:22:33 +0900 (JST) Received: by filterdrecv-p3mdw1-75c584b9c6-jl2gb with SMTP id filterdrecv-p3mdw1-75c584b9c6-jl2gb-19-5F116DF4-1A 2020-07-17 09:23:00.219845432 +0000 UTC m=+1786410.219406604 Received: from herokuapp.com (unknown) by geopod-ismtpd-6-0 (SG) with ESMTP id 6_n4TwhqTteZDrIlnMLFBw for ; Fri, 17 Jul 2020 09:23:00.180 +0000 (UTC) Date: Fri, 17 Jul 2020 09:23:00 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 74990 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 16029 X-Redmine-Issue-Author: byroot X-Redmine-Sender: Eregon 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: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr1n53dpy7=2F4zHM7O9mxrZ?= =?us-ascii?Q?xkcr4SXqFCtDm9ZDkUX7bE7F2DUJ2nPu6Alww8s?= =?us-ascii?Q?jVbudrApYKy1RMFYiItamUvzCFpFWnehdtr2UZM?= =?us-ascii?Q?I6kL96+w7urr3JkSPdmgDVN0Z4Umbrs+y289CWq?= =?us-ascii?Q?MROU1=2FTBn=2FSffIXrbLg2l45bkgToWWvMWfJ8Fh+?= =?us-ascii?Q?ftIgAU46hhCTef0AY=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 99201 Subject: [ruby-core:99201] [Ruby master Feature#16029] Expose fstring related APIs 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 #16029 has been updated by Eregon (Benoit Daloze). See https://bugs.ruby-lang.org/issues/13381#note-6 ---------------------------------------- Feature #16029: Expose fstring related APIs to C-extensions https://bugs.ruby-lang.org/issues/16029#change-86580 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal ---------------------------------------- As discussed with @tenderlove here: https://github.com/ruby/ruby/pull/2287#issuecomment-513865160 We'd like to update various data format parsers (JSON, MessagePack, etc) to add the possibility to deduplicate strings while parsing. But unfortunately the `rb_fstring_*` family of functions isn't available to C-extensions, so the only available fallback is `rb_funcall(str, rb_intern("-@"))` which most parsers will likely consider too slow. So the various `rb_fstring_*` functions would need to be public. Proposed patch: https://github.com/ruby/ruby/pull/2299 -- https://bugs.ruby-lang.org/