summaryrefslogtreecommitdiffstats
path: root/README.EXT
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 13:30:17 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 13:30:17 +0000
commitf96333343f0abe20b366929a09b4ac4a194dceb3 (patch)
tree0e468d6ae442a3f890249481054428b829fd2fc3 /README.EXT
parent74b7fe1b101ad16863841398cd96614d0116d406 (diff)
downloadruby-f96333343f0abe20b366929a09b4ac4a194dceb3.tar.gz
ruby-f96333343f0abe20b366929a09b4ac4a194dceb3.tar.xz
ruby-f96333343f0abe20b366929a09b4ac4a194dceb3.zip
* include/ruby/ruby.h (STR2CSTR): removed.
(rb_str2cstr): removed. * object.c (rb_str2cstr): removed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r--README.EXT6
1 files changed, 1 insertions, 5 deletions
diff --git a/README.EXT b/README.EXT
index edfbf221a..b720fba3a 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