ruby-changes:12297
From: nobu <ko1@a...>
Date: Wed, 8 Jul 2009 18:28:24 +0900 (JST)
Subject: [ruby-changes:12297] Ruby:r23991 (trunk): * proc.c ({proc,binding,method}_data_type): typed.
nobu 2009-07-08 18:28:09 +0900 (Wed, 08 Jul 2009) New Revision: 23991 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23991 Log: * proc.c ({proc,binding,method}_data_type): typed. Modified files: trunk/ChangeLog trunk/proc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 23990) +++ ChangeLog (revision 23991) @@ -1,6 +1,6 @@ -Wed Jul 8 17:13:36 2009 Nobuyoshi Nakada <nobu@r...> +Wed Jul 8 18:28:04 2009 Nobuyoshi Nakada <nobu@r...> - * proc.c ({proc,method}_data_type): typed. + * proc.c ({proc,binding,method}_data_type): typed. Wed Jul 8 16:47:03 2009 Nobuyoshi Nakada <nobu@r...> Index: proc.c =================================================================== --- proc.c (revision 23990) +++ proc.c (revision 23991) @@ -255,12 +255,25 @@ RUBY_MARK_LEAVE("binding"); } +static size_t +binding_memsize(void *ptr) +{ + return ptr ? sizeof(rb_binding_t) : 0; +} + +static const rb_data_type_t binding_data_type = { + "binding", + binding_mark, + binding_free, + binding_memsize, +}; + static VALUE binding_alloc(VALUE klass) { VALUE obj; rb_binding_t *bind; - obj = Data_Make_Struct(klass, rb_binding_t, binding_mark, binding_free, bind); + obj = TypedData_Make_Struct(klass, rb_binding_t, &binding_data_type, bind); return obj; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/