Skip to content

Commit

Permalink
Fixed issue #36
Browse files Browse the repository at this point in the history
The member "ob_type" is not present in the pcapobject struct. One must use the macro "Py_TYPE(...)" instead.
  • Loading branch information
Noxet authored Oct 30, 2017
1 parent 342e37c commit f4d87c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pcapobj.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f4d87c0

Please sign in to comment.