From 074a374c86dbef53f29e3edd830bdba7696d3210 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 31 Jan 2009 13:30:17 +0000 Subject: * 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 --- README.EXT | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'README.EXT') 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 -- cgit v1.2.3