]> granicus.if.org Git - libnl/commit
python: remove use of PyArg_ParseTuple() for callback result
authorArend van Spriel <arend@broadcom.com>
Mon, 30 Sep 2013 08:21:46 +0000 (10:21 +0200)
committerThomas Graf <tgraf@suug.ch>
Mon, 7 Oct 2013 07:45:56 +0000 (09:45 +0200)
commitae7f8cc988d9d5abfaf1639c218e450d015e2ad0
treec012b1896032bbaa1d58e25ca48b9846637dca48
parentb9284bcded445a7d245a9c92ffcf3f94d549b621
python: remove use of PyArg_ParseTuple() for callback result

The message receive callback handler in the netlink api processes
the result object from the python callback. It used PyArg_ParseTuple()
to get the value, but this does not work as intended (see ref [1]).
Instead check the type and convert it accordingly.

refs:
[1] http://stackoverflow.com/questions/13636711/what-is-the-proper-usage-of-pyarg-parsetuple

Reported-by: Teto <mattator@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
python/examples/wiphy.py
python/netlink/capi.i