summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/floatobject.c6
-rw-r--r--Objects/intobject.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 8533e0e..6a95ebf 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -38,6 +38,11 @@ extern int errno;
#include <ctype.h>
#include <math.h>
+#ifdef i860
+/* Cray APP has bogus definition of HUGE_VAL in <math.h> */
+#undef HUGE_VAL
+#endif
+
#ifdef HUGE_VAL
#define CHECK(x) if (errno != 0) ; \
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
@@ -170,6 +175,7 @@ float_hash(v)
}
else {
fractpart = frexp(fractpart, &expo);
+ fractpart = fractpart*4294967296.0; /* 2**32 */
x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
}
if (x == -1)
diff --git a/Objects/intobject.c b/Objects/intobject.c
index 6806f0c..3021873 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -426,7 +426,7 @@ int_int(v)
intobject *v;
{
INCREF(v);
- return v;
+ return (object *)v;
}
static object *
@@ -512,5 +512,5 @@ typeobject Inttype = {
&int_as_number, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
- &int_hash, /*tp_hash*/
+ int_hash, /*tp_hash*/
};