[Python-checkins] r42046 - in python/trunk: Doc/lib/libsocket.tex Misc/ACKS Misc/NEWS Modules/socketmodule.c Modules/socketmodule.h configure configure.in pyconfig.h.in
Neal Norwitz
nnorwitz at gmail.com
Sat Jan 14 22:09:52 CET 2006
> --- python/trunk/Modules/socketmodule.c (original)
> +++ python/trunk/Modules/socketmodule.c Sat Jan 14 19:12:57 2006
> @@ -954,6 +954,14 @@
> }
> #endif /* AF_UNIX */
>
> +#if defined(AF_NETLINK)
> + case AF_NETLINK:
> + {
> + struct sockaddr_nl *a = (struct sockaddr_nl *) addr;
> + return Py_BuildValue("ii", a->nl_pid, a->nl_groups);
> + }
> @@ -1090,6 +1098,31 @@
> }
> #endif /* AF_UNIX */
>
> +#if defined(AF_NETLINK)
> + case AF_NETLINK:
> + {
> + struct sockaddr_nl* addr;
> + int pid, groups;
> [...]
> + if (!PyArg_ParseTuple(args, "II:getsockaddrarg", &pid, &groups))
Should the format values for Py_BuildValue (above) be II (2 cap eye's)
like the format to Py_ParseTuple?
n
More information about the Python-checkins
mailing list