diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-21 09:43:10 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-03-21 09:43:10 +0000 |
commit | 073982a0fcfa76e444ce374437b05b1bcf5831d6 (patch) | |
tree | 0ac7bb94d725eacba6c2622292e971c259c1072c /marshal.c | |
parent | e8c4115d8b2bd633fc98b624f2138e8adb66cc62 (diff) |
fix screw-ups in gc.c and marshal.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,7 +14,7 @@ #include "rubyio.h" #include "st.h" -#ifndef atof +#if !defined(atof) && !defined(HAVE_STDLIB_H) double strtod(); #endif @@ -46,7 +46,7 @@ shortlen(len, ds) num = SHORTDN(num); offset++; } - return len*sizeof(BDIGIT)/sizeof(short) - offset; + return (len - 1)*sizeof(BDIGIT)/sizeof(short) + offset; } #define SHORTLEN(x) shortlen((x),d) #endif @@ -1055,7 +1055,7 @@ marshal_load(argc, argv) \tformat version %d.%d required; %d.%d given", MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); } - if (minor != MARSHAL_MINOR) { + if (ruby_verbose && minor != MARSHAL_MINOR) { rb_warn("incompatible marshal file format (can be read)\n\ \tformat version %d.%d required; %d.%d given", MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); |