8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de33b5c commit c965cf6Copy full SHA for c965cf6
Include/pyport.h
@@ -24,9 +24,10 @@
24
#define _Py_CAST(type, expr) ((type)(expr))
25
26
// Static inline functions should use _Py_NULL rather than using directly NULL
27
-// to prevent C++ compiler warnings. On C++11 and newer, _Py_NULL is defined as
28
-// nullptr.
29
-#if defined(__cplusplus) && __cplusplus >= 201103
+// to prevent C++ compiler warnings. On C23 and newer and on C++11 and newer,
+// _Py_NULL is defined as nullptr.
+#if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
30
+ || (defined(__cplusplus) && __cplusplus >= 201103)
31
# define _Py_NULL nullptr
32
#else
33
# define _Py_NULL NULL
0 commit comments