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

hide internal data objects

* marshal.c (compat_allocator_table): hide the wrapper object of
  compat_allocator_tbl.

* process.c (rb_execarg_new): hide wrapper objects of struct
  rb_execarg.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-12-04 07:37:21 +00:00
parent 2208c6b442
commit 340fe20a3b
3 changed files with 4 additions and 5 deletions

View file

@ -3996,11 +3996,11 @@ Init_win32ole(void)
message_filter.RetryRejectedCall = mf_RetryRejectedCall;
message_filter.MessagePending = mf_MessagePending;
enc2cp_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, 0);
enc2cp_hash = TypedData_Wrap_Struct(0, &win32ole_hash_datatype, 0);
RTYPEDDATA_DATA(enc2cp_hash) = st_init_numtable();
rb_gc_register_mark_object(enc2cp_hash);
com_hash = TypedData_Wrap_Struct(rb_cData, &win32ole_hash_datatype, 0);
com_hash = TypedData_Wrap_Struct(0, &win32ole_hash_datatype, 0);
RTYPEDDATA_DATA(com_hash) = st_init_numtable();
rb_gc_register_mark_object(com_hash);

View file

@ -2240,7 +2240,7 @@ compat_allocator_table(void)
#undef RUBY_UNTYPED_DATA_WARNING
#define RUBY_UNTYPED_DATA_WARNING 0
compat_allocator_tbl_wrapper =
Data_Wrap_Struct(rb_cData, mark_marshal_compat_t, 0, compat_allocator_tbl);
Data_Wrap_Struct(0, mark_marshal_compat_t, 0, compat_allocator_tbl);
rb_gc_register_mark_object(compat_allocator_tbl_wrapper);
return compat_allocator_tbl;
}

View file

@ -2237,8 +2237,7 @@ rb_execarg_new(int argc, const VALUE *argv, int accept_shell)
{
VALUE execarg_obj;
struct rb_execarg *eargp;
execarg_obj = TypedData_Make_Struct(rb_cData, struct rb_execarg, &exec_arg_data_type, eargp);
hide_obj(execarg_obj);
execarg_obj = TypedData_Make_Struct(0, struct rb_execarg, &exec_arg_data_type, eargp);
rb_execarg_init(argc, argv, accept_shell, execarg_obj);
return execarg_obj;
}