Skip to content

Commit 5a31514

Browse files
committed
fix incompatible pointer warning
1 parent a7c124f commit 5a31514

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stringdtype/stringdtype/src/dtype.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,14 +707,15 @@ StringDType_richcompare(PyObject *self, PyObject *other, int op)
707707
}
708708

709709
static Py_hash_t
710-
StringDType_hash(StringDTypeObject *self)
710+
StringDType_hash(PyObject *self)
711711
{
712+
StringDTypeObject *sself = (StringDTypeObject *)self;
712713
PyObject *hash_tup = NULL;
713-
if (self->na_object != NULL) {
714-
hash_tup = Py_BuildValue("(iO)", self->coerce, self->na_object);
714+
if (sself->na_object != NULL) {
715+
hash_tup = Py_BuildValue("(iO)", sself->coerce, sself->na_object);
715716
}
716717
else {
717-
hash_tup = Py_BuildValue("(i)", self->coerce);
718+
hash_tup = Py_BuildValue("(i)", sself->coerce);
718719
}
719720

720721
Py_hash_t ret = PyObject_Hash(hash_tup);

0 commit comments

Comments
 (0)