summaryrefslogtreecommitdiff
path: root/doc/extension.rdoc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-18 02:36:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-18 02:36:14 +0000
commit7a86165d43829ed4a464dc9b14e48ffb0d1a6798 (patch)
tree6c50cef4f2e6ef571e3d153c2ae127cdaf32418e /doc/extension.rdoc
parentb4ab9c0e3214c619f2025fb19ff8e010d99112eb (diff)
[DOC] mention rb_str_modify
[ruby-core:91134] [Bug #15543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'doc/extension.rdoc')
-rw-r--r--doc/extension.rdoc8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/extension.rdoc b/doc/extension.rdoc
index b7cba0d5e8..1355cdae64 100644
--- a/doc/extension.rdoc
+++ b/doc/extension.rdoc
@@ -279,6 +279,14 @@ rb_str_set_len(VALUE str, long len) ::
up to len bytes, regardless RSTRING_LEN(str). len must not exceed
the capacity of str.
+rb_str_modify(VALUE str) ::
+
+ Prepares a Ruby string to modify. If str is not modifiable, this
+ function raises an exception, or if the buffer of str is shared,
+ this function allocates new buffer to make it unshared. Always
+ you MUST call this function before modifying the contents using
+ RSTRING_PTR and/or rb_str_set_len.
+
==== Array Functions
rb_ary_new() ::