Skip to content

Commit 056a4f7

Browse files
committed
Add casts
1 parent 20b73c3 commit 056a4f7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Objects/complexobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,10 @@ static Py_hash_t
412412
complex_hash(PyComplexObject *v)
413413
{
414414
Py_uhash_t hashreal, hashimag, combined;
415-
hashreal = (Py_uhash_t)_Py_HashDouble(v, v->cval.real);
415+
hashreal = (Py_uhash_t)_Py_HashDouble((PyObject *) v, v->cval.real);
416416
if (hashreal == (Py_uhash_t)-1)
417417
return -1;
418-
hashimag = (Py_uhash_t)_Py_HashDouble(v, v->cval.imag);
418+
hashimag = (Py_uhash_t)_Py_HashDouble((PyObject *)v, v->cval.imag);
419419
if (hashimag == (Py_uhash_t)-1)
420420
return -1;
421421
/* Note: if the imaginary part is 0, hashimag is 0 now,

Objects/floatobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ float_richcompare(PyObject *v, PyObject *w, int op)
556556
static Py_hash_t
557557
float_hash(PyFloatObject *v)
558558
{
559-
return _Py_HashDouble(v, v->ob_fval);
559+
return _Py_HashDouble((PyObject *)v, v->ob_fval);
560560
}
561561

562562
static PyObject *

0 commit comments

Comments
 (0)