Skip to content

Commit 0830625

Browse files
committed
Use INCREF instead of NewRef to support older python
1 parent 67430da commit 0830625

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ext.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ static PyObject* atomlist_owner(PyObject* mod, PyObject* obj)
5050
struct AtomList* alist = (struct AtomList*) obj;
5151
if (!alist->pointer || !alist->pointer->data)
5252
Py_RETURN_NONE;
53-
return Py_NewRef(alist->pointer->data);
53+
Py_INCREF(alist->pointer->data);
54+
return alist->pointer->data;
5455
}
5556

5657
static PyMethodDef ext_methods[] = {

0 commit comments

Comments
 (0)