mirror of
https://github.com/python/cpython.git
synced 2025-10-28 09:10:36 +00:00
gh-105927: Deprecate PyWeakref_GetObject() function (#106006)
Deprecate PyWeakref_GetObject() and PyWeakref_GET_OBJECT() functions.
This commit is contained in:
parent
dac3d389e7
commit
c075a1974b
7 changed files with 33 additions and 4 deletions
|
|
@ -32,7 +32,8 @@ struct _PyWeakReference {
|
|||
vectorcallfunc vectorcall;
|
||||
};
|
||||
|
||||
static inline PyObject* PyWeakref_GET_OBJECT(PyObject *ref_obj) {
|
||||
Py_DEPRECATED(3.13) static inline PyObject* PyWeakref_GET_OBJECT(PyObject *ref_obj)
|
||||
{
|
||||
PyWeakReference *ref;
|
||||
PyObject *obj;
|
||||
assert(PyWeakref_Check(ref_obj));
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob,
|
|||
PyObject *callback);
|
||||
PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob,
|
||||
PyObject *callback);
|
||||
PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref);
|
||||
Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref);
|
||||
PyAPI_FUNC(int) PyWeakref_GetRef(PyObject *ref, PyObject **pobj);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue