summaryrefslogtreecommitdiffstats
path: root/Include/cpython/weakrefobject.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-92781: Avoid mixing declarations and code in C API (#92783) (#92813)Victor Stinner2022-05-161-2/+4
| | | | | | | Avoid mixing declarations and code in the C API to fix the compiler warning: "ISO C90 forbids mixed declarations and code" [-Werror=declaration-after-statement]. (cherry picked from commit 90e72300730189c4a48529baaad9b0005d40731c)
* gh-89653: PEP 670: Limited API doesn't cast arguments (GH-92654)Miss Islington (bot)2022-05-111-1/+3
| | | | | | | | | | | The limited API version 3.11 no longer casts arguments to expected types of functions of functions: * PyList_GET_SIZE(), PyList_SET_ITEM() * PyTuple_GET_SIZE(), PyTuple_SET_ITEM() * PyWeakref_GET_OBJECT() (cherry picked from commit 7d3b469e475e6e52ce4f0bad7198bb05ead77b1d) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-91320: Fix more old-style cast warnings in C++ (#92247)Victor Stinner2022-05-031-1/+1
| | | | | | | Use _Py_CAST(), _Py_STATIC_CAST() and _PyASCIIObject_CAST() in static inline functions to fix C++ compiler warnings: "use of old-style cast" (clang -Wold-style-cast). test_cppext now builds the C++ test extension with -Wold-style-cast.
* gh-89653: PEP 670: Convert PyWeakref_GET_OBJECT() to function (#91785)Victor Stinner2022-04-211-10/+16
| | | | | | Convert the PyWeakref_GET_OBJECT() macro to a static inline function. Add an assertion to check the argument with PyWeakref_Check(). Add a macro converting the argument to PyObject* to prevent emitting new compiler warning.
* bpo-46481: Implement vectorcall for weakref.ref.__call__ method. (GH-30820)Dong-hee Na2022-01-231-0/+1
|
* bpo-35134: Split warnings.h and weakrefobject.h (GH-29042)Victor Stinner2021-10-181-0/+47
Split header files to move the non-limited API to Include/cpython/: * Include/warnings.h => Include/cpython/warnings.h * Include/weakrefobject.h => Include/cpython/weakrefobject.h Exclude PyWeakref_GET_OBJECT() from the limited C API. It never worked since the PyWeakReference structure is opaque in the limited C API. Move _PyWarnings_Init() and _PyErr_WarnUnawaitedCoroutine() to the internal C API.