mirror of
https://github.com/python/cpython.git
synced 2025-09-05 00:11:10 +00:00
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505)
This commit is contained in:
parent
8bcc3fa345
commit
713eb184b5
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue