No description
![]() The callback functionality only worked for regular Python functions. With this patch it also allows the callback to be a class method (bounded or unbounded) as show in example below. class test_class(object): def my_callback(self, msg, arg): print('handling %s' % str(msg)) s = netlink.core.Socket() testobj = test_class() netlink.capi.py_nl_cb_set(cb, netlink.capi.NL_CB_VALID, netlink.capi.NL_CB_CUSTOM, test_class.my_callback, testobj) netlink.capi.py_nl_cb_err(cb, netlink.capi.NL_CB_CUSTOM, test_class.my_callback, s) Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> |
||
---|---|---|
doc | ||
etc | ||
include | ||
lib | ||
m4 | ||
man | ||
python | ||
src | ||
tests | ||
.gitignore | ||
autogen.sh | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
libnl-3.0.pc.in | ||
libnl-cli-3.0.pc.in | ||
libnl-genl-3.0.pc.in | ||
libnl-idiag-3.0.pc.in | ||
libnl-nf-3.0.pc.in | ||
libnl-route-3.0.pc.in | ||
libnl.sym.in | ||
Makefile.am |