From: mame@... Date: 2019-09-03T16:42:23+00:00 Subject: [ruby-core:94763] [Ruby master Feature#16029] Expose fstring related APIs to C-extensions 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/ Unsubscribe: