1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* README.EXT: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2008-06-13 05:56:51 +00:00
parent 074a876df5
commit 26f26890aa
2 changed files with 10 additions and 1 deletions

View file

@ -5,6 +5,8 @@ Fri Jun 13 14:41:26 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* README.EXT.ja: describe about StringValueCStr().
* README.EXT: ditto.
Fri Jun 13 14:24:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* gc.c (rb_memerror): exit with EXIT_FAILURE instead of magic number.

View file

@ -31,7 +31,7 @@ The Ruby interpreter has the following data types:
T_STRING string
T_REGEXP regular expression
T_ARRAY array
T_FIXNUM Fixnum(31bit integer)
T_FIXNUM Fixnum(31bit or 63bit integer)
T_HASH associative array
T_STRUCT (Ruby) structure
T_BIGNUM multi precision integer
@ -106,6 +106,13 @@ representation of var. These macros will skip the replacement if var
is a String. Notice that the macros take only the lvalue as their
argument, to change the value of var in place.
You can also use the macro named StringValueCStr(). This is just
like StringValuePtr(), but always add nul character at the end of
the result. If the result contains nul character, this macro causes
the ArgumentError exception.
StringValuePtr() doesn't gurantee to exist nul at the end of the
result, and the result may contain nul.
In version 1.6 or earlier, STR2CSTR() was used to do the same thing
but now it is deprecated in version 1.7, because STR2CSTR() has a risk
of a dangling pointer problem in the to_str() implicit conversion.