mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* marshal.c (w_short, w_long, w_object): get rid of VC++ warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bb7a2d40ff
commit
0d16b614bf
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Mar 21 20:38:06 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* marshal.c (w_short, w_long, w_object): get rid of VC++ warnings.
|
||||||
|
|
||||||
Wed Mar 21 20:05:07 2007 Koichi Sasada <ko1@atdot.net>
|
Wed Mar 21 20:05:07 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,
|
* compile.c, parse.y, eval.c, intern.h, iseq.c, lex.c, node.h,
|
||||||
|
|
10
marshal.c
10
marshal.c
|
@ -143,8 +143,8 @@ w_bytes(const char *s, int n, struct dump_arg *arg)
|
||||||
static void
|
static void
|
||||||
w_short(int x, struct dump_arg *arg)
|
w_short(int x, struct dump_arg *arg)
|
||||||
{
|
{
|
||||||
w_byte((x >> 0) & 0xff, arg);
|
w_byte((char)((x >> 0) & 0xff), arg);
|
||||||
w_byte((x >> 8) & 0xff, arg);
|
w_byte((char)((x >> 8) & 0xff), arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -165,11 +165,11 @@ w_long(long x, struct dump_arg *arg)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (0 < x && x < 123) {
|
if (0 < x && x < 123) {
|
||||||
w_byte(x + 5, arg);
|
w_byte((char)(x + 5), arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (-124 < x && x < 0) {
|
if (-124 < x && x < 0) {
|
||||||
w_byte((x - 5)&0xff, arg);
|
w_byte((char)((x - 5)&0xff), arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (i=1;i<sizeof(long)+1;i++) {
|
for (i=1;i<sizeof(long)+1;i++) {
|
||||||
|
@ -548,7 +548,7 @@ w_object(VALUE obj, struct dump_arg *arg, int limit)
|
||||||
w_uclass(obj, rb_cRegexp, arg);
|
w_uclass(obj, rb_cRegexp, arg);
|
||||||
w_byte(TYPE_REGEXP, arg);
|
w_byte(TYPE_REGEXP, arg);
|
||||||
w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);
|
w_bytes(RREGEXP(obj)->str, RREGEXP(obj)->len, arg);
|
||||||
w_byte(rb_reg_options(obj), arg);
|
w_byte((char)rb_reg_options(obj), arg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_ARRAY:
|
case T_ARRAY:
|
||||||
|
|
Loading…
Reference in a new issue