* include/ruby/defines.h (INFINITY): this is float.

* include/ruby/defines.h (NAN): ditto.

* numericc.c (rb_infinity): change content as float.

* numericc.c (rb_nan): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-12-30 10:44:02 +00:00
parent 499bf746da
commit 9db87ea5b9
3 changed files with 18 additions and 6 deletions

View file

@ -102,15 +102,17 @@ void xfree(void*);
#ifdef INFINITY
# define HAVE_INFINITY
#else
/** @internal */
extern const unsigned char rb_infinity[];
# define INFINITY (*(double *)rb_infinity)
# define INFINITY (*(float *)rb_infinity)
#endif
#ifdef NAN
# define HAVE_NAN
#else
/** @internal */
extern const unsigned char rb_nan[];
# define NAN (*(double *)rb_nan)
# define NAN (*(float *)rb_nan)
#endif
#ifdef __CYGWIN__