1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* marshal.c (r_object0): don't call user-defined initialize for

T_STRUCT objects.

* include/ruby/intern.h (rb_struct_initialize): declared.

* struct.c (rb_struct_initialize): export.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-09-08 16:19:13 +00:00
parent c19ebe04e6
commit a8b4677b14
4 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,12 @@
Sun Sep 9 01:17:05 2007 Tanaka Akira <akr@fsij.org>
* marshal.c (r_object0): don't call user-defined initialize for
T_STRUCT objects.
* include/ruby/intern.h (rb_struct_initialize): declared.
* struct.c (rb_struct_initialize): export.
Sat Sep 8 23:55:56 2007 Tanaka Akira <akr@fsij.org>
* eval_method.ci (rb_get_alloc_func): new function to get allocation

View file

@ -531,6 +531,7 @@ VALUE rb_str_length(VALUE);
VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define(const char*, ...);
VALUE rb_struct_alloc(VALUE, VALUE);
VALUE rb_struct_initialize(VALUE, VALUE);
VALUE rb_struct_aref(VALUE, VALUE);
VALUE rb_struct_aset(VALUE, VALUE, VALUE);
VALUE rb_struct_getmember(VALUE, ID);

View file

@ -1276,7 +1276,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
}
rb_ary_push(values, r_object(arg));
}
rb_obj_call_init(v, RARRAY_LEN(values), RARRAY_PTR(values));
rb_struct_initialize(v, values);
v = r_leave(v, arg);
}
break;

View file

@ -300,7 +300,7 @@ rb_struct_s_def(int argc, VALUE *argv, VALUE klass)
/*
*/
static VALUE
VALUE
rb_struct_initialize(VALUE self, VALUE values)
{
VALUE klass = rb_obj_class(self);