зеркало из https://github.com/github/ruby.git
* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
use NEWOBJ_OF() instead of NEWOBJ(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0824f9f224
Коммит
925c936bb1
|
@ -1,3 +1,8 @@
|
|||
Mon May 13 14:57:28 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (rb_data_object_alloc, rb_data_typed_object_alloc):
|
||||
use NEWOBJ_OF() instead of NEWOBJ().
|
||||
|
||||
Mon May 13 14:51:59 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* proc.c (rb_obj_singleton_method): new method Kernel#singleton_method
|
||||
|
|
11
gc.c
11
gc.c
|
@ -715,9 +715,8 @@ rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
|
|||
VALUE
|
||||
rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
|
||||
{
|
||||
NEWOBJ(data, struct RData);
|
||||
if (klass) Check_Type(klass, T_CLASS);
|
||||
OBJSETUP(data, klass, T_DATA);
|
||||
NEWOBJ_OF(data, struct RData, klass, T_DATA);
|
||||
Check_Type(klass, T_CLASS);
|
||||
data->data = datap;
|
||||
data->dfree = dfree;
|
||||
data->dmark = dmark;
|
||||
|
@ -728,12 +727,8 @@ rb_data_object_alloc(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_F
|
|||
VALUE
|
||||
rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
|
||||
{
|
||||
NEWOBJ(data, struct RTypedData);
|
||||
|
||||
NEWOBJ_OF(data, struct RTypedData, klass, T_DATA);
|
||||
if (klass) Check_Type(klass, T_CLASS);
|
||||
|
||||
OBJSETUP(data, klass, T_DATA);
|
||||
|
||||
data->data = datap;
|
||||
data->typed_flag = 1;
|
||||
data->type = type;
|
||||
|
|
Загрузка…
Ссылка в новой задаче