summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2008-06-21 11:15:30 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2008-06-21 11:15:30 (GMT)
commit30fa13f3a00e9d782f7ae1bef380d663ab9956c2 (patch)
tree68c5da28cbdaaad07bfdf10e38507dddacfa65c1 /Objects
parente0e711446ba62b8b07bc7a14eb53674c9b0a4862 (diff)
downloadcpython-30fa13f3a00e9d782f7ae1bef380d663ab9956c2.zip
cpython-30fa13f3a00e9d782f7ae1bef380d663ab9956c2.tar.gz
cpython-30fa13f3a00e9d782f7ae1bef380d663ab9956c2.tar.bz2
Fix build on FreeBSD gcc.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/floatobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index bbe8a19..f8d1207 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -405,11 +405,11 @@ PyFloat_AsStringEx(char *buf, PyFloatObject *v, int precision)
obj is not of float, int or long type, Py_NotImplemented is incref'ed,
stored in obj, and returned from the function invoking this macro.
*/
-#define CONVERT_TO_DOUBLE(obj, dbl) \
- if (PyFloat_Check(obj)) \
- dbl = PyFloat_AS_DOUBLE(obj); \
- else if (convert_to_double(&(obj), &(dbl)) < 0) \
- return obj;
+#define CONVERT_TO_DOUBLE(obj, dbl) \
+ if (PyFloat_Check(obj)) \
+ dbl = PyFloat_AS_DOUBLE(obj); \
+ else if (convert_to_double((PyObject **)&(obj), &(dbl)) < 0) \
+ return (PyObject *)(obj);
static int
convert_to_double(PyObject **v, double *dbl)
@@ -1212,7 +1212,7 @@ _float_to_base(PyFloatObject *v, unaryfunc int_to_base)
int i, exp, n;
char *conv_str;
- CONVERT_TO_DOUBLE(((PyObject *)v), x);
+ CONVERT_TO_DOUBLE(v, x);
if (!Py_IS_FINITE(x))
return PyObject_Repr((PyObject *)v);
fr = frexp(x, &exp);