summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 07:37:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-04 07:37:21 +0000
commit340fe20a3be042ea416442c137b4652acfb37a5d (patch)
tree03ed29a05627e91fc1085365aa80dc6171c4c157
parent2208c6b442b9ddea2d16f260a0201a33fdab14ce (diff)
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
-rw-r--r--ext/win32ole/win32ole.c4
-rw-r--r--marshal.c2
-rw-r--r--process.c3
3 files changed, 4 insertions, 5 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 5015dde27df..9d0b1b04314 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -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);
diff --git a/marshal.c b/marshal.c
index 61eb01e7217..dbf8dd461b5 100644
--- a/marshal.c
+++ b/marshal.c
@@ -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;
}
diff --git a/process.c b/process.c
index da7556b858b..7662387eca1 100644
--- a/process.c
+++ b/process.c
@@ -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;
}