Skip to content

Commit 65528b9

Browse files
Andy Groverstratakis
authored andcommitted
python3: Use PyVarObject_HEAD_INIT instead of PyObject_HEAD_INIT
as described here: http://python3porting.com/cextensions.html#object-initialization Signed-off-by: Andy Grover <agrover@redhat.com>
1 parent a30b943 commit 65528b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python-ethtool/etherinfo_obj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ static PyMethodDef _ethtool_etherinfo_methods[] = {
277277
*
278278
*/
279279
PyTypeObject PyEtherInfo_Type = {
280-
PyObject_HEAD_INIT(NULL)
280+
PyVarObject_HEAD_INIT(NULL, 0)
281281
.tp_name = "ethtool.etherinfo",
282282
.tp_basicsize = sizeof(PyEtherInfo),
283283
.tp_flags = Py_TPFLAGS_HAVE_CLASS,

0 commit comments

Comments
 (0)