mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* proc.c ({proc,binding,method}_data_type): typed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ebd13e3eed
commit
abbd115cae
2 changed files with 16 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
Wed Jul 8 17:13:36 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Jul 8 18:28:04 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
|
|
15
proc.c
15
proc.c
|
@ -255,12 +255,25 @@ binding_mark(void *ptr)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue