Skip to content

Commit a30b943

Browse files
Andy Groverstratakis
authored andcommitted
python3: Use Py_TYPE() instead of self->ob_type
As described here: http://python3porting.com/cextensions.html#object-initialization Signed-off-by: Andy Grover <agrover@redhat.com>
1 parent 76ef749 commit a30b943

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
@@ -42,7 +42,7 @@ static void _ethtool_etherinfo_dealloc(PyEtherInfo *self)
4242
close_netlink(self);
4343
Py_XDECREF(self->device); self->device = NULL;
4444
Py_XDECREF(self->hwaddress); self->hwaddress = NULL;
45-
self->ob_type->tp_free((PyObject*)self);
45+
Py_TYPE(self)->tp_free((PyObject*)self);
4646
}
4747

4848

0 commit comments

Comments
 (0)