mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
aaf346059d
commit
e59e5e90c0
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Oct 24 18:49:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/objspace/objspace.c (type2sym, count_objects_size): use enum
|
||||
instead of size_t which may be larger than actual values.
|
||||
|
||||
Wed Oct 24 17:41:24 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* benchmark/driver.rb: add `-x' or `--exclude' option
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue