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-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 E22C41F461 for ; Tue, 3 Sep 2019 16:42:33 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 767AF1209FC; Wed, 4 Sep 2019 01:42:25 +0900 (JST) 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 9A1B91209F9 for ; Wed, 4 Sep 2019 01:42:22 +0900 (JST) Received: by filter0016p3iad2.sendgrid.net with SMTP id filter0016p3iad2-31242-5D6E97EF-C 2019-09-03 16:42:23.177129602 +0000 UTC m=+243.112352487 Received: from herokuapp.com (unknown [54.175.120.76]) by ismtpd0012p1iad1.sendgrid.net (SG) with ESMTP id J4nFv_CBSEeN9aQAw-UxKQ for ; Tue, 03 Sep 2019 16:42:23.015 +0000 (UTC) Date: Tue, 03 Sep 2019 16:42:23 +0000 (UTC) From: mame@ruby-lang.org Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 70317 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 16029 X-Redmine-Issue-Author: byroot X-Redmine-Sender: mame 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?EJh2gqwnyqXtd++xo=2FinyA1V0bXouTB4FkWnzNiKb4+o5S6iquA2H7+AUf0rum?= =?us-ascii?Q?giD6DiZl6HIAni8AeDOHVxZ2amAShK4JL2A5W6r?= =?us-ascii?Q?NXwx3sdRwi5uRBA5J9blApxlRQbqDROZi0nnq4z?= =?us-ascii?Q?iGfY6abWbFU2wedshuiy=2FYZZMAxVRLirosuhrW7?= =?us-ascii?Q?AyewkQHddQdavWty9r+=2FIRfXboTkq043YZQ=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 94763 Subject: [ruby-core:94763] [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 mame (Yusuke Endoh). @ko1 and @nobu discussed the issue. The memo says: > ko1, nobu: now it is difficult to expose them because of current implementation. I didn't follow the discussion, so I don't know the detail. @ko1 , @nobu , could you explain them? ---------------------------------------- Feature #16029: Expose fstring related APIs to C-extensions https://bugs.ruby-lang.org/issues/16029#change-81377 * Author: byroot (Jean Boussier) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- 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/