summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-24 09:49:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-24 09:49:18 +0000
commite59e5e90c09f6d67695a0c592a1940585c1cc72e (patch)
treeca27c27de087fcf173cda49f91fa2184cae22918 /ext
parentaaf346059d0b998ab4d31099d8c3043df1034bf7 (diff)
objspace.c: enum ruby_value_type
* ext/objspace/objspace.c (type2sym, count_objects_size): use enum instead of size_t which may be larger than actual values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/objspace/objspace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/objspace/objspace.c b/ext/objspace/objspace.c
index 41abed90f4..1889f11382 100644
--- a/ext/objspace/objspace.c
+++ b/ext/objspace/objspace.c
@@ -271,7 +271,7 @@ cos_i(void *vstart, void *vend, size_t stride, void *data)
}
static VALUE
-type2sym(int i)
+type2sym(enum ruby_value_type i)
{
VALUE type;
switch (i) {
@@ -335,7 +335,7 @@ count_objects_size(int argc, VALUE *argv, VALUE os)
{
size_t counts[T_MASK+1];
size_t total = 0;
- size_t i;
+ enum ruby_value_type i;
VALUE hash;
if (rb_scan_args(argc, argv, "01", &hash) == 1) {