Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Move declaration to Include/cpython
That way it doesn't need the Py_LIMITED_API guard
  • Loading branch information
encukou committed Apr 27, 2023
commit e2c4b37bcfa2f2cf97a35591438ca4b58d3cdb62
3 changes: 3 additions & 0 deletions Include/cpython/objimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,6 @@ PyAPI_FUNC(int) PyObject_IS_GC(PyObject *obj);
PyAPI_FUNC(int) PyType_SUPPORTS_WEAKREFS(PyTypeObject *type);

PyAPI_FUNC(PyObject **) PyObject_GET_WEAKREFS_LISTPTR(PyObject *op);

PyAPI_FUNC(PyObject *) PyUnstable_Object_GC_NewWithExtraData(PyTypeObject *,
size_t);
4 changes: 0 additions & 4 deletions Include/objimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ PyAPI_FUNC(PyVarObject *) PyObject_InitVar(PyVarObject *,
PyAPI_FUNC(PyObject *) _PyObject_New(PyTypeObject *);
PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t);

#if !defined(Py_LIMITED_API)
PyAPI_FUNC(PyObject *) PyUnstable_Object_GC_NewWithExtraData(PyTypeObject *, size_t);
#endif

#define PyObject_New(type, typeobj) ((type *)_PyObject_New(typeobj))

// Alias to PyObject_New(). In Python 3.8, PyObject_NEW() called directly
Expand Down