path: root/README.EXT
diff options
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
commitf208b3ad51d4f6c040d255672ab45f28496f4577 (patch)
treea6f67591f5263c19346542368ad3b147ee67472a /README.EXT
parent46799937ee259e85df53bda7d65693ccfbefe8b2 (diff)
* README.EXT: should mention new macros: RSTRING_PTR, RSTRING_LEN,
RARRAY_PTR, RARRAY_LEN. * README.EXT.ja: ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'README.EXT')
1 files changed, 4 insertions, 4 deletions
diff --git a/README.EXT b/README.EXT
index 2fc2fd6..283de48 100644
@@ -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