Discussion:
[Python-3000-checkins] r66556 - in python/branches/py3k: Objects/floatobject.c Python/pymath.c
andrew.macintyre
2008-09-22 14:49:02 UTC
Permalink
Author: andrew.macintyre
Date: Mon Sep 22 16:49:01 2008
New Revision: 66556

Log:
Merged revisions 66552-66553 via svnmerge from
svn+ssh://pythondev at svn.python.org/python/trunk

........
r66552 | andrew.macintyre | 2008-09-23 00:10:54 +1000 (Tue, 23 Sep 2008) | 5 lines

should use macro'ed symbols not direct

Part of source_os2emx.patch in issue 3868
Reviewed by Amaury Forgeot d'Arc
........
r66553 | andrew.macintyre | 2008-09-23 00:11:41 +1000 (Tue, 23 Sep 2008) | 5 lines

any platform without HAVE_LOG1P should have DBL_EPSILON in <float.h>

Part of source_os2emx.patch in issue 3868
Reviewed by Amaury Forgeot d'Arc
........


Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Objects/floatobject.c
python/branches/py3k/Python/pymath.c

Modified: python/branches/py3k/Objects/floatobject.c
==============================================================================
--- python/branches/py3k/Objects/floatobject.c (original)
+++ python/branches/py3k/Objects/floatobject.c Mon Sep 22 16:49:01 2008
@@ -1248,12 +1248,12 @@
s++;

/* infinities and nans */
- if (PyOS_mystrnicmp(s, "nan", 4) == 0) {
+ if (PyOS_strnicmp(s, "nan", 4) == 0) {
x = Py_NAN;
goto finished;
}
- if (PyOS_mystrnicmp(s, "inf", 4) == 0 ||
- PyOS_mystrnicmp(s, "infinity", 9) == 0) {
+ if (PyOS_strnicmp(s, "inf", 4) == 0 ||
+ PyOS_strnicmp(s, "infinity", 9) == 0) {
x = sign*Py_HUGE_VAL;
goto finished;
}

Modified: python/branches/py3k/Python/pymath.c
==============================================================================
--- python/branches/py3k/Python/pymath.c (original)
+++ python/branches/py3k/Python/pymath.c Mon Sep 22 16:49:01 2008
@@ -35,6 +35,8 @@
#endif /* HAVE_COPYSIGN */

#ifndef HAVE_LOG1P
+#include <float.h>
+
double
log1p(double x)
{

Loading...