Skip to content

Commit

Permalink
* README.EXT: should mention new macros: RSTRING_PTR, RSTRING_LEN,
Browse files Browse the repository at this point in the history
  RARRAY_PTR, RARRAY_LEN.

* README.EXT.ja: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Sep 16, 2006
1 parent 4679993 commit f208b3a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Sat Sep 16 19:47:16 2006 Yukihiro Matsumoto <[email protected]>

* README.EXT: should mention new macros: RSTRING_PTR, RSTRING_LEN,
RARRAY_PTR, RARRAY_LEN.

* README.EXT.ja: ditto.

Sat Sep 16 16:39:23 2006 Nobuyoshi Nakada <[email protected]>

* Makefile.in, common.in, instruby.rb, ext/extmk.rb, lib/mkmf.rb:
Expand Down
8 changes: 4 additions & 4 deletions README.EXT
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions README.EXT.ja
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ obsolete
ruby.h�ǤϹ�¤�Τإ��㥹�Ȥ���ޥ������RXXXXX()��(������ʸ
���ˤ������)�Ȥ���̾�����󶡤���Ƥ��ޤ�(��: RSTRING())��

�㤨�С�ʸ����str��Ĺ�������뤿��ˤϡ�RSTRING(str)->len�פ�
����ʸ����str��char*�Ȥ������뤿��ˤϡ�RSTRING(str)->ptr��
�Ȥ��ޤ�������ξ��ˤϡ����줾���RARRAY(ary)->len�ס�
��RARRAY(ary)->ptr�פȤʤ�ޤ���
��¤�Τ���ǡ�������Ф��ޥ������󶡤���Ƥ��ޤ���ʸ����
str��Ĺ�������뤿��ˤϡ�RSTRING_LEN(str)�פȤ���ʸ����str��
char*�Ȥ������뤿��ˤϡ�RSTRING_PTR(str)�פȤ��ޤ��������
���ˤϡ����줾���RARRAY_LEN(ary)�ס���RARRAY_PTR(ary)�פ�
�ʤ�ޤ���

Ruby�ι�¤�Τ�ľ�ܥ�������������˵���Ĥ��ʤ���Фʤ�ʤ���
�Ȥϡ������ʸ����ι�¤�Τ���Ȥϻ��Ȥ�������ǡ�ľ���ѹ���
Expand Down

0 comments on commit f208b3a

Please sign in to comment.