Skip to content

Commit 027bb6a

Browse files
Andy Groverstratakis
authored andcommitted
python3: set PyEtherInfo.tp_flags to Py_TPFLAGS_DEFAULT
The tp_flags field is basically feature flags. The Py2 features are assumed for Py3 and thus are no longer defined. Just use Py_TPFLAGS_DEFAULT. Furthermore, Py_TPFLAGS_DEFAULT should also work when building against Python 2 -- TPFLAGS_DEFAULT includes TPFLAGS_HAVE_CLASS. Signed-off-by: Andy Grover <agrover@redhat.com>
1 parent 65528b9 commit 027bb6a

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
@@ -280,7 +280,7 @@ PyTypeObject PyEtherInfo_Type = {
280280
PyVarObject_HEAD_INIT(NULL, 0)
281281
.tp_name = "ethtool.etherinfo",
282282
.tp_basicsize = sizeof(PyEtherInfo),
283-
.tp_flags = Py_TPFLAGS_HAVE_CLASS,
283+
.tp_flags = Py_TPFLAGS_DEFAULT,
284284
.tp_dealloc = (destructor)_ethtool_etherinfo_dealloc,
285285
.tp_str = (reprfunc)_ethtool_etherinfo_str,
286286
.tp_getattro = (getattrofunc)_ethtool_etherinfo_getter,

0 commit comments

Comments
 (0)