Skip to content

Commit 258cb3b

Browse files
committed
Fix NotImplemented reference counting
1 parent 9aa25d5 commit 258cb3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stringdtype/stringdtype/src/dtype.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ StringDType_richcompare(PyObject *self, PyObject *other, int op)
487487
PyTypeObject *otype = Py_TYPE(other);
488488

489489
if (stype != otype) {
490+
Py_INCREF(Py_NotImplemented);
490491
return Py_NotImplemented;
491492
}
492493

@@ -508,6 +509,7 @@ StringDType_richcompare(PyObject *self, PyObject *other, int op)
508509
return Py_True;
509510
}
510511

512+
Py_INCREF(Py_NotImplemented);
511513
return Py_NotImplemented;
512514
}
513515

0 commit comments

Comments
 (0)