From 72ba13aa8e86eb7f12bd17737a689ad2ec214036 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sun, 8 Jun 2008 10:01:40 +0000 Subject: * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c, enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- proc.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index f0934a5a4d..864e8df6ad 100644 --- a/proc.c +++ b/proc.c @@ -248,8 +248,7 @@ binding_alloc(VALUE klass) { VALUE obj; rb_binding_t *bind; - obj = Data_Make_Struct(klass, rb_binding_t, - binding_mark, binding_free, bind); + obj = Data_Make_Struct(klass, rb_binding_t, binding_mark, binding_free, bind); return obj; } @@ -869,8 +868,7 @@ method_unbind(VALUE obj) Data_Get_Struct(obj, struct METHOD, orig); method = - Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, free, - data); + Data_Make_Struct(rb_cUnboundMethod, struct METHOD, bm_mark, -1, data); data->oclass = orig->oclass; data->recv = Qundef; data->id = orig->id; @@ -1135,8 +1133,7 @@ method_clone(VALUE self) struct METHOD *orig, *data; Data_Get_Struct(self, struct METHOD, orig); - clone = - Data_Make_Struct(CLASS_OF(self), struct METHOD, bm_mark, free, data); + clone = Data_Make_Struct(CLASS_OF(self), struct METHOD, bm_mark, -1, data); CLONESETUP(clone, self); *data = *orig; @@ -1299,7 +1296,7 @@ umethod_bind(VALUE method, VALUE recv) } } - method = Data_Make_Struct(rb_cMethod, struct METHOD, bm_mark, free, bound); + method = Data_Make_Struct(rb_cMethod, struct METHOD, bm_mark, -1, bound); *bound = *data; bound->recv = recv; bound->rclass = CLASS_OF(recv); -- cgit v1.2.3