ruby-changes:5117
From: matz <ko1@a...>
Date: Mon, 26 May 2008 16:52:02 +0900 (JST)
Subject: [ruby-changes:5117] Ruby:r16612 (trunk): * util.c (ruby_strtod): clear errno at the top of our own
matz 2008-05-26 16:51:46 +0900 (Mon, 26 May 2008) New Revision: 16612 Modified files: trunk/ChangeLog trunk/object.c trunk/util.c Log: * util.c (ruby_strtod): clear errno at the top of our own impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16612&r2=16611&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/util.c?r1=16612&r2=16611&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/object.c?r1=16612&r2=16611&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 16611) +++ ChangeLog (revision 16612) @@ -66,8 +66,8 @@ Sat May 24 22:32:49 2008 Yukihiro Matsumoto <matz@r...> - * object.c (rb_cstr_to_dbl): should clear errno before calling - strtod(3). [ruby-dev:34834] + * util.c (ruby_strtod): clear errno at the top of our own + impelementation of strtod(3). [ruby-dev:34834] [ruby-dev:34839] Sat May 24 15:26:16 2008 Yusuke Endoh <mame@t...> Index: object.c =================================================================== --- object.c (revision 16611) +++ object.c (revision 16612) @@ -2045,7 +2045,6 @@ if (!p) return 0.0; q = p; while (ISSPACE(*p)) p++; - errno = 0; d = strtod(p, &end); if (errno == ERANGE) { OutOfRange(); Index: util.c =================================================================== --- util.c (revision 16611) +++ util.c (revision 16612) @@ -1000,8 +1000,6 @@ #define IEEE_Arith #endif -#include "errno.h" - #ifdef Bad_float_h #ifdef IEEE_Arith @@ -2206,6 +2204,7 @@ const char *s2; #endif + errno = 0; sign = nz0 = nz = 0; dval(rv) = 0.; for (s = s00;;s++) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/