From f4d87c0c8d2c9b897ef1b15a59bbcb55d3a0cced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20S=C3=B6nnerup?= Date: Mon, 30 Oct 2017 11:17:42 +0100 Subject: [PATCH] Fixed issue #36 The member "ob_type" is not present in the pcapobject struct. One must use the macro "Py_TYPE(...)" instead. --- pcapobj.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcapobj.cc b/pcapobj.cc index c0e2fc0..e2a4470 100644 --- a/pcapobj.cc +++ b/pcapobj.cc @@ -649,7 +649,7 @@ p_sendpacket(register pcapobject* pp, PyObject* args) static PyObject* p_getfd(register pcapobject* pp, PyObject* args) { - if (pp->ob_type != &Pcaptype) + if (Py_TYPE(pp) != &Pcaptype) { PyErr_SetString(PcapError, "Not a pcap object"); return NULL;