as described here:
http://python3porting.com/cextensions.html#object-initialization
Signed-off-by: Andy Grover <agrover(a)redhat.com>
---
python-ethtool/etherinfo_obj.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python-ethtool/etherinfo_obj.c b/python-ethtool/etherinfo_obj.c
index d8cec32..2b9bc5d 100644
--- a/python-ethtool/etherinfo_obj.c
+++ b/python-ethtool/etherinfo_obj.c
@@ -277,7 +277,7 @@ static PyMethodDef _ethtool_etherinfo_methods[] = {
*
*/
PyTypeObject PyEtherInfo_Type = {
- PyObject_HEAD_INIT(NULL)
+ PyVarObject_HEAD_INIT(NULL, 0)
.tp_name = "ethtool.etherinfo",
.tp_basicsize = sizeof(PyEtherInfo),
.tp_flags = Py_TPFLAGS_HAVE_CLASS,
--
1.9.3