mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
marshal.c: PRIsVALUE
* marshal.c (path2class, path2module): use PRIsVALUE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
dd2eb69457
commit
cfa4a59da8
2 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
||||||
Tue Dec 4 16:23:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Dec 4 16:23:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* marshal.c (path2class, path2module): use PRIsVALUE.
|
||||||
|
|
||||||
* marshal.c (w_object, marshal_dump, marshal_load): use
|
* marshal.c (w_object, marshal_dump, marshal_load): use
|
||||||
rb_check_funcall if possible.
|
rb_check_funcall if possible.
|
||||||
|
|
|
@ -1381,8 +1381,7 @@ path2class(VALUE path)
|
||||||
VALUE v = rb_path_to_class(path);
|
VALUE v = rb_path_to_class(path);
|
||||||
|
|
||||||
if (!RB_TYPE_P(v, T_CLASS)) {
|
if (!RB_TYPE_P(v, T_CLASS)) {
|
||||||
rb_raise(rb_eArgError, "%.*s does not refer to class",
|
rb_raise(rb_eArgError, "%"PRIsVALUE" does not refer to class", path);
|
||||||
(int)RSTRING_LEN(path), RSTRING_PTR(path));
|
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
@ -1393,8 +1392,7 @@ path2module(VALUE path)
|
||||||
VALUE v = rb_path_to_class(path);
|
VALUE v = rb_path_to_class(path);
|
||||||
|
|
||||||
if (!RB_TYPE_P(v, T_MODULE)) {
|
if (!RB_TYPE_P(v, T_MODULE)) {
|
||||||
rb_raise(rb_eArgError, "%.*s does not refer to module",
|
rb_raise(rb_eArgError, "%"PRIsVALUE" does not refer to module", path);
|
||||||
(int)RSTRING_LEN(path), RSTRING_PTR(path));
|
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue