summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
author(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-10 08:44:29 +0000
committer(no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-10 08:44:29 +0000
commit6e3a72afccaa2bcd1b44a447c179bd81c27ac567 (patch)
treef99563ed31c2f6a8facc7160cccde602d39af79b /marshal.c
parent62e648e148b3cb9f96dcce808c55c02b7ccb4486 (diff)
This commit was manufactured by cvs2svn to create tag
'v1_3_1_990210'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990210@399 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);
}