mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
gh-91321: Fix PyModuleDef_HEAD_INIT on C++ (#92259)
The PyModuleDef_HEAD_INIT macro now uses _Py_NULL to fix C++ compiler warnings when using it in C++.
This commit is contained in:
parent
d9ec553194
commit
3a35b62ea0
1 changed files with 5 additions and 5 deletions
|
@ -48,11 +48,11 @@ typedef struct PyModuleDef_Base {
|
|||
PyObject* m_copy;
|
||||
} PyModuleDef_Base;
|
||||
|
||||
#define PyModuleDef_HEAD_INIT { \
|
||||
PyObject_HEAD_INIT(NULL) \
|
||||
NULL, /* m_init */ \
|
||||
0, /* m_index */ \
|
||||
NULL, /* m_copy */ \
|
||||
#define PyModuleDef_HEAD_INIT { \
|
||||
PyObject_HEAD_INIT(_Py_NULL) \
|
||||
_Py_NULL, /* m_init */ \
|
||||
0, /* m_index */ \
|
||||
_Py_NULL, /* m_copy */ \
|
||||
}
|
||||
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue