diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-21 11:38:42 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-03-21 11:38:42 +0000 |
commit | 0d16b614bfef56f513a51caf604f6f5e13418ae5 (patch) | |
tree | b1c85e93ec131dd26591a385a9db707509a295da /marshal.c | |
parent | bb7a2d40ff6190f819feb3d9eef0caaffec1a3f9 (diff) |
* 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
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -143,8 +143,8 @@ w_bytes(const char *s, int n, struct dump_arg *arg) static void w_short(int x, struct dump_arg *arg) { - w_byte((x >> 0) & 0xff, arg); - w_byte((x >> 8) & 0xff, arg); + w_byte((char)((x >> 0) & 0xff), arg); + w_byte((char)((x >> 8) & 0xff), arg); } static void @@ -165,11 +165,11 @@ w_long(long x, struct dump_arg *arg) return; } if (0 < x && x < 123) { - w_byte(x + 5, arg); + w_byte((char)(x + 5), arg); return; } if (-124 < x && x < 0) { - w_byte((x - 5)&0xff, arg); + w_byte((char)((x - 5)&0xff), arg); return; } 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_byte(TYPE_REGEXP, 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; case T_ARRAY: |