diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 13:30:17 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 13:30:17 +0000 |
commit | 074a374c86dbef53f29e3edd830bdba7696d3210 (patch) | |
tree | 0e468d6ae442a3f890249481054428b829fd2fc3 /README.EXT | |
parent | 849e730f1573812b1bd64ac7f6512fa55bd91686 (diff) | |
download | ruby-074a374c86dbef53f29e3edd830bdba7696d3210.tar.gz |
* include/ruby/ruby.h (STR2CSTR): removed.
(rb_str2cstr): removed.
* object.c (rb_str2cstr): removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r-- | README.EXT | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/README.EXT b/README.EXT index edfbf221a6..b720fba3a4 100644 --- a/README.EXT +++ b/README.EXT @@ -103,7 +103,7 @@ numbers into C integers. These macros includes a type check, so an exception will be raised if the conversion failed. NUM2DBL() can be used to retrieve the double float value in the same way. -In version 1.7 or later it is recommended that you use the new macros +You can use the macros StringValue() and StringValuePtr() to get a char* from a VALUE. StringValue(var) replaces var's value with the result of "var.to_str()". StringValuePtr(var) does same replacement and returns char* @@ -118,10 +118,6 @@ 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. - Other data types have corresponding C structures, e.g. struct RArray for T_ARRAY etc. The VALUE of the type which has the corresponding structure can be cast to retrieve the pointer to the struct. The |