Skip to content

Commit 713eb18

Browse files
authored
gh-93442: Add test for _Py_CAST(nullptr). (gh-93505)
1 parent 8bcc3fa commit 713eb18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/_testcppext.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ test_api_casts(PyObject *Py_UNUSED(module), PyObject *Py_UNUSED(args))
7777
// gh-93442: Pass 0 as NULL for PyObject*
7878
Py_XINCREF(0);
7979
Py_XDECREF(0);
80+
// ensure that nullptr works too
81+
Py_XINCREF(nullptr);
82+
Py_XDECREF(nullptr);
8083

8184
Py_DECREF(obj);
8285
Py_RETURN_NONE;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy