Content-Length: 211293 | pFad | http://github.com/python/cpython/commit/3a35b62ea003182c643516098cc781944d425800

51 gh-91321: Fix PyModuleDef_HEAD_INIT on C++ (#92259) · python/cpython@3a35b62 · GitHub
Skip to content

Commit

Permalink
gh-91321: Fix PyModuleDef_HEAD_INIT on C++ (#92259)
Browse files Browse the repository at this point in the history
The PyModuleDef_HEAD_INIT macro now uses _Py_NULL to fix C++ compiler
warnings when using it in C++.
  • Loading branch information
vstinner authored May 3, 2022
1 parent d9ec553 commit 3a35b62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Include/moduleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a35b62

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/3a35b62ea003182c643516098cc781944d425800

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy