diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 05:56:51 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-13 05:56:51 +0000 |
| commit | 47fdb57958bc673376390f653a7bf09e4c118c6f (patch) | |
| tree | 225ae604692fe848da27dc9c1d43e1571ba9bc84 /README.EXT | |
| parent | 4c93a3310c594bbec654e7cc9345071dc06f9d85 (diff) | |
| download | ruby-47fdb57958bc673376390f653a7bf09e4c118c6f.tar.gz ruby-47fdb57958bc673376390f653a7bf09e4c118c6f.tar.xz ruby-47fdb57958bc673376390f653a7bf09e4c118c6f.zip | |
* README.EXT: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
| -rw-r--r-- | README.EXT | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/README.EXT b/README.EXT index f93f82997..daf67a503 100644 --- a/README.EXT +++ b/README.EXT @@ -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. |
