[Python-checkins] r86499 - in python/branches/py3k: Include/moduleobject.h Misc/NEWS
david.malcolm
python-checkins at python.org
Wed Nov 17 22:20:19 CET 2010
Author: david.malcolm
Date: Wed Nov 17 22:20:18 2010
New Revision: 86499
Log:
Issue #9518: Extend the PyModuleDef_HEAD_INIT macro to explicitly
zero-initialize all fields, fixing compiler warnings seen when building
extension modules with gcc with "-Wmissing-field-initializers" (implied
by "-W")
Modified:
python/branches/py3k/Include/moduleobject.h
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Include/moduleobject.h
==============================================================================
--- python/branches/py3k/Include/moduleobject.h (original)
+++ python/branches/py3k/Include/moduleobject.h Wed Nov 17 22:20:18 2010
@@ -28,7 +28,12 @@
PyObject* m_copy;
} PyModuleDef_Base;
-#define PyModuleDef_HEAD_INIT {PyObject_HEAD_INIT(NULL)}
+#define PyModuleDef_HEAD_INIT { \
+ PyObject_HEAD_INIT(NULL) \
+ NULL, /* m_init */ \
+ 0, /* m_index */ \
+ NULL, /* m_copy */ \
+ }
typedef struct PyModuleDef{
PyModuleDef_Base m_base;
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Wed Nov 17 22:20:18 2010
@@ -10,6 +10,11 @@
Core and Builtins
-----------------
+- Issue #9518: Extend the PyModuleDef_HEAD_INIT macro to explicitly
+ zero-initialize all fields, fixing compiler warnings seen when building
+ extension modules with gcc with "-Wmissing-field-initializers" (implied
+ by "-W")
+
Library
-------
More information about the Python-checkins
mailing list