summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 11:14:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 11:14:05 +0000
commit3a32ef53aaab15199e59c643630726b041c9fa88 (patch)
tree497cd16ea9db5b867ed794e06aff1f80ad5fb55b
parentb80ddbf461a9a215513d6bbd78bab7185a927a31 (diff)
* README.EXT, README.EXT.ja (String functions): mention
rb_str_resize and rb_str_set_len. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--README.EXT17
-rw-r--r--README.EXT.ja16
3 files changed, 38 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a564b23e0..2bc32fda98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 5 20:13:49 2010 Nobuyoshi Nakada <[email protected]>
+
+ * README.EXT, README.EXT.ja (String functions): mention
+ rb_str_resize and rb_str_set_len.
+
Thu Aug 5 19:59:55 2010 Nobuyoshi Nakada <[email protected]>
* string.c (rb_str_set_len): bail out when buffer overflowed
diff --git a/README.EXT b/README.EXT
index 72dba58c5d..ac0d7cc98d 100644
--- a/README.EXT
+++ b/README.EXT
@@ -223,6 +223,23 @@ listed below:
Creates a new Ruby string with encoding US-ASCII.
+ rb_str_resize(VALUE str, long len)
+
+ Resizes Ruby string to len bytes. If str is not modifiable, this
+ function raises an exception. The length of str must be set in
+ advance. If len is less than the old length the content beyond
+ len bytes is discarded, else if len is greater than the old length
+ the content beyond the old length bytes will not be preserved but
+ will be garbage. Note that RSTRING_PTR(str) may change by calling
+ this function.
+
+ rb_str_set_len(VALUE str, long len)
+
+ Sets the length of Ruby string. If str is not modifiable, this
+ function raises an exception. This function preserves the content
+ upto len bytes, regardless RSTRING_LEN(str). len must not exceed
+ the capacity of str.
+
Array functions
rb_ary_new()
diff --git a/README.EXT.ja b/README.EXT.ja
index dae0d24b43..9d70602740 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -250,6 +250,22 @@ Ruby���Ѱդ��Ƥ���ؿ����Ѥ��Ƥ���������
���󥳡��ǥ��󥰤�US-ASCII��Ruby��ʸ�������������.
+ rb_str_resize(VALUE str, long len)
+
+ Ruby��ʸ����Υ�������len�Х��Ȥ��ѹ����롥str��Ĺ������
+ �ʤƥ��åȤ���Ƥ��ʤ���Фʤ�ʤ���len������Ĺ������û
+ �����ϡ�len�Х��Ȥ�ۤ�����ʬ�����ƤϼΤƤ��롥len����
+ ��Ĺ������Ĺ�����ϡ�����Ĺ����ۤ�����ʬ�����Ƥ���¸��
+ ��ʤ��ǥ��ߤˤʤ�����������δؿ��θƤӽФ��ˤ�ä�
+ RSTRING_PTR(str)���ѹ�����뤫�⤷��ʤ����Ȥ����ա�
+
+ rb_str_set_len(VALUE str, long len)
+
+ Ruby��ʸ����Υ�������len�Х��Ȥ˥��åȤ��롥str���ѹ���
+ ǽ�Ǥʤ�����㳰��ȯ�����롥RSTRING_LEN(str)�Ȥ�̵�ط��ˡ�
+ len�Х��ȤޤǤ����Ƥ���¸����롥len��str�����̤�ۤ��Ƥ�
+ �ƤϤʤ�ʤ���
+
������Ф���ؿ�