New GitHub issue #119851 from vstinner:<br>
<hr>
<pre>
On C23 and newer and on C++11 and newer, `nullptr` is preferred over `NULL` to specify a "null pointer". Python has a private `_Py_NULL` macro for that. Static inline functions should use Py_NULL rather than using directly NULL to prevent C++ compiler warnings.
```c
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
|| (defined(__cplusplus) && __cplusplus >= 201103)
# define _Py_NULL nullptr
#else
# define _Py_NULL NULL
#endif
```
I propose to make the macro public to make it usable in more cases: rename `_Py_NULL` to `Py_NULL`.
</pre>
<hr>
<a href="https://github.com/python/cpython/issues/119851">View on GitHub</a>
<p>Labels: </p>
<p>Assignee: </p>