mirror of https://github.com/python/cpython
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505) (gh-93509)
(cherry picked from commit 713eb184b5
)
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
This commit is contained in:
parent
d97e2c52d3
commit
c21f2bdaf1
|
@ -77,6 +77,9 @@ test_api_casts(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
|
|||
// gh-93442: Pass 0 as NULL for PyObject*
|
||||
Py_XINCREF(0);
|
||||
Py_XDECREF(0);
|
||||
// ensure that nullptr works too
|
||||
Py_XINCREF(nullptr);
|
||||
Py_XDECREF(nullptr);
|
||||
|
||||
Py_DECREF(obj);
|
||||
Py_RETURN_NONE;
|
||||
|
|
Loading…
Reference in New Issue