1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 18:25:41 +03:00
aports/community/libteam/swig4.1.patch
2022-11-23 10:15:41 +01:00

21 lines
769 B
Diff

diff --git a/binding/python/team/capi.i.in b/binding/python/team/capi.i.in
index c7a5842..6a0b4c4 100644
--- a/binding/python/team/capi.i.in
+++ b/binding/python/team/capi.i.in
@@ -45,13 +45,15 @@ int team_hwaddr_set(struct team_handle *th, uint32_t ifindex, const char *addr,
%apply char *OUTPUT {char *addr};
int team_hwaddr_get(struct team_handle *th, uint32_t ifindex, char *addr, unsigned int addr_len);
-%typemap(python, in) PyObject *PyFunc {
+#ifdef SWIG
+%typemap(in) PyObject *PyFunc {
if (!PyCallable_Check($input)) {
PyErr_SetString(PyExc_TypeError, "Need a callable object!");
return NULL;
}
$1 = $input;
}
+#endif
%typemap(in) void (*func)(struct team_handle *, void *,
team_change_type_mask_t) {