Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Define functions at the bottom of object.c
  • Loading branch information
vstinner committed Nov 5, 2020
commit 146d28d3d184f364ed7366bbe92b89b8dd73bc82
31 changes: 16 additions & 15 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,6 @@ Py_DecRef(PyObject *o)
Py_XDECREF(o);
}

#undef Py_NewRef
#undef Py_XNewRef

PyObject*
Py_NewRef(PyObject *obj)
{
return _Py_NewRef(obj);
}

PyObject*
Py_XNewRef(PyObject *obj)
{
return _Py_XNewRef(obj);
}

PyObject *
PyObject_Init(PyObject *op, PyTypeObject *tp)
{
Expand Down Expand Up @@ -2223,6 +2208,22 @@ PyObject_GET_WEAKREFS_LISTPTR(PyObject *op)
}


#undef Py_NewRef
#undef Py_XNewRef

// Export Py_NewRef() and Py_XNewRef() as regular functions for the stable ABI.
PyObject*
Py_NewRef(PyObject *obj)
{
return _Py_NewRef(obj);
}

PyObject*
Py_XNewRef(PyObject *obj)
{
return _Py_XNewRef(obj);
}

#ifdef __cplusplus
}
#endif