summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-09 06:08:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-09 06:08:24 +0000
commit115eb4595cea72226ec8acd357e7c403e2c4b04a (patch)
treec050f1ee16f730fc7dbc89586e09b33a23196485 /marshal.c
parent9b64dfe3b8f0343ebf97ae80d3a4ec3f4bd115b3 (diff)
990209
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/marshal.c b/marshal.c
index 6a68b04352..0267e328cd 100644
--- a/marshal.c
+++ b/marshal.c
@@ -12,6 +12,10 @@
#include "rubyio.h"
#include "st.h"
+#ifndef atof
+double strtod();
+#endif
+
#define MARSHAL_MAJOR 4
#define MARSHAL_MINOR 0
@@ -641,13 +645,10 @@ r_object(arg)
case TYPE_FLOAT:
{
-#ifndef atof
- double atof();
-#endif
char *buf;
r_bytes(buf, arg);
- v = rb_float_new(atof(buf));
+ v = rb_float_new(strtod(buf, 0));
return r_regist(v, arg);
}