ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:80447] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions
       [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
@ 2017-03-29  5:29 ` eagletmt
  2017-03-29  5:36 ` [ruby-core:80448] [Ruby trunk Feature#13381][Feedback] " ko1
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: eagletmt @ 2017-03-29  5:29 UTC (permalink / raw)
  To: 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:80448] [Ruby trunk Feature#13381][Feedback] [PATCH] Expose rb_fstring and its family to C extensions
       [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
  2017-03-29  5:29 ` [ruby-core:80447] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions eagletmt
@ 2017-03-29  5:36 ` ko1
  2017-03-29  6:32 ` [ruby-core:80451] [Ruby trunk Feature#13381] " rubygems
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: ko1 @ 2017-03-29  5:36 UTC (permalink / raw)
  To: 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:80451] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions
       [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
  2017-03-29  5:29 ` [ruby-core:80447] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions eagletmt
  2017-03-29  5:36 ` [ruby-core:80448] [Ruby trunk Feature#13381][Feedback] " ko1
@ 2017-03-29  6:32 ` rubygems
  2017-06-16  7:58 ` [ruby-core:81703] [Ruby trunk Feature#13381][Assigned] " ko1
  2017-06-16  8:00 ` [ruby-core:81704] [Ruby trunk Feature#13381] " nobu
  4 siblings, 0 replies; 5+ messages in thread
From: rubygems @ 2017-03-29  6:32 UTC (permalink / raw)
  To: ruby-core

Issue #13381 has been updated by eagletmt (Kohei Suzuki).


OK, I've read comments of #13077.

What do you think of renaming fstring to "deduped" string? "Deduped" strings are implicitly frozen.

- Rename `rb_fstring` to `rb_str_deduped`
- Rename `rb_fstring_new` to `rb_str_deduped_new`
- Rename `rb_fstring_cstr` to `rb_str_deduped_cstr`
- Rename `rb_fstring_enc_new` to `rb_enc_str_deduped_new`
- Rename `rb_fstring_enc_cstr` to `rb_enc_str_deduped_cstr`
    - I think `enc` should come first for consistency

----------------------------------------
Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions
https://bugs.ruby-lang.org/issues/13381#change-63942

* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:81703] [Ruby trunk Feature#13381][Assigned] [PATCH] Expose rb_fstring and its family to C extensions
       [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2017-03-29  6:32 ` [ruby-core:80451] [Ruby trunk Feature#13381] " rubygems
@ 2017-06-16  7:58 ` ko1
  2017-06-16  8:00 ` [ruby-core:81704] [Ruby trunk Feature#13381] " nobu
  4 siblings, 0 replies; 5+ messages in thread
From: ko1 @ 2017-06-16  7:58 UTC (permalink / raw)
  To: ruby-core

Issue #13381 has been updated by ko1 (Koichi Sasada).

Status changed from Feedback to Assigned
Assignee set to ko1 (Koichi Sasada)

----------------------------------------
Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions
https://bugs.ruby-lang.org/issues/13381#change-65393

* Author: eagletmt (Kohei Suzuki)
* Status: Assigned
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:81704] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions
       [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2017-06-16  7:58 ` [ruby-core:81703] [Ruby trunk Feature#13381][Assigned] " ko1
@ 2017-06-16  8:00 ` nobu
  4 siblings, 0 replies; 5+ messages in thread
From: nobu @ 2017-06-16  8:00 UTC (permalink / raw)
  To: ruby-core

Issue #13381 has been updated by nobu (Nobuyoshi Nakada).

Assignee deleted (ko1 (Koichi Sasada))

How about `fixed_str`?

----------------------------------------
Feature #13381: [PATCH] Expose rb_fstring and its family to C extensions
https://bugs.ruby-lang.org/issues/13381#change-65394

* Author: eagletmt (Kohei Suzuki)
* Status: Assigned
* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-16  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-13381.20170329052912@ruby-lang.org>
2017-03-29  5:29 ` [ruby-core:80447] [Ruby trunk Feature#13381] [PATCH] Expose rb_fstring and its family to C extensions eagletmt
2017-03-29  5:36 ` [ruby-core:80448] [Ruby trunk Feature#13381][Feedback] " ko1
2017-03-29  6:32 ` [ruby-core:80451] [Ruby trunk Feature#13381] " rubygems
2017-06-16  7:58 ` [ruby-core:81703] [Ruby trunk Feature#13381][Assigned] " ko1
2017-06-16  8:00 ` [ruby-core:81704] [Ruby trunk Feature#13381] " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).