summaryrefslogtreecommitdiffstats
path: root/README.EXT
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-16 10:51:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-16 10:51:35 +0000
commita57aec306c44b37c1b78a2c0ada546853c914c0d (patch)
treea6f67591f5263c19346542368ad3b147ee67472a /README.EXT
parent12676c84a56fe8a3b2ea2df5a20283dfa1c3502f (diff)
downloadruby-a57aec306c44b37c1b78a2c0ada546853c914c0d.tar.gz
ruby-a57aec306c44b37c1b78a2c0ada546853c914c0d.tar.xz
ruby-a57aec306c44b37c1b78a2c0ada546853c914c0d.zip
* README.EXT: should mention new macros: RSTRING_PTR, RSTRING_LEN,
RARRAY_PTR, RARRAY_LEN. * README.EXT.ja: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
-rw-r--r--README.EXT8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.EXT b/README.EXT
index 2fc2fd606..283de48b7 100644
--- a/README.EXT
+++ b/README.EXT
@@ -115,10 +115,10 @@ can be cast to retrieve the pointer to the struct. The casting macro
will be of the form RXXXX for each data type; for instance, RARRAY(obj).
See "ruby.h".
-For example, `RSTRING(str)->len' is the way to get the size of the
-Ruby String object. The allocated region can be accessed by
-`RSTRING(str)->ptr'. For arrays, use `RARRAY(ary)->len' and
-`RARRAY(ary)->ptr' respectively.
+There are some accessing macros for structure members, for example
+`RSTRING_LEN(s)' to to get the size of the Ruby String object. The
+allocated region can be accessed by `RSTRING_PTR(str). For arrays, use
+`RARRAY_LEN(ary) and `RARRAY_PTR(ary) respectively.
Notice: Do not change the value of the structure directly, unless you
are responsible for the result. This ends up being the cause of interesting