mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* README.EXT, README.EXT.ja (3.3): clarified -1 as free for
Data_Wrap_Struct(). [ruby-dev:19881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8d3e57221a
commit
153f513f49
3 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Apr 02 15:11:23 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* README.EXT, README.EXT.ja (3.3): clarified -1 as free for
|
||||
Data_Wrap_Struct(). [ruby-dev:19881]
|
||||
|
||||
Mon Mar 31 10:50:48 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* hash.c (env_reject_bang): untaint key string.
|
||||
|
|
|
@ -422,8 +422,9 @@ DATA), use Data_Wrap_Struct().
|
|||
Data_Wrap_Struct() returns a created DATA object. The klass argument
|
||||
is the class for the DATA object. The mark argument is the function
|
||||
to mark Ruby objects pointed by this data. The free argument is the
|
||||
function to free the pointer allocation. The functions mark and
|
||||
free will be called from garbage collector.
|
||||
function to free the pointer allocation. If this is -1, the pointer
|
||||
will be just freed. The functions mark and free will be called from
|
||||
garbage collector.
|
||||
|
||||
You can allocate and wrap the structure in one step.
|
||||
|
||||
|
|
|
@ -502,7 +502,8 @@ C
|
|||
# そのような参照は勧められません.
|
||||
|
||||
freeはこの構造体がもう不要になった時に呼ばれる関数です.この
|
||||
関数がガーベージコレクタから呼ばれます.
|
||||
関数がガーベージコレクタから呼ばれます.これが-1の場合は,単
|
||||
純に開放されます.
|
||||
|
||||
Cの構造体の割当とDataオブジェクトの生成を同時に行うマクロと
|
||||
して以下のものが提供されています.
|
||||
|
|
Loading…
Reference in a new issue