summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--README.EXT5
-rw-r--r--README.EXT.ja3
3 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 88987b109b..91256c923f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/README.EXT b/README.EXT
index 97e57934be..3a37db4e11 100644
--- a/README.EXT
+++ b/README.EXT
@@ -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.
diff --git a/README.EXT.ja b/README.EXT.ja
index f4681880b4..f49083e60e 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -502,7 +502,8 @@ Cの構造体へのポインタです.markはこの構造体がRubyのオブジェ
# そのような参照は勧められません.
freeはこの構造体がもう不要になった時に呼ばれる関数です.この
-関数がガーベージコレクタから呼ばれます.
+関数がガーベージコレクタから呼ばれます.これが-1の場合は,単
+純に開放されます.
Cの構造体の割当とDataオブジェクトの生成を同時に行うマクロと
して以下のものが提供されています.