AF_UNIX + SOCK_DGRAM
Donn Cave
donn at u.washington.edu
Mon Jun 24 18:52:52 EDT 2002
Quoth Chris Liechti <cliechti at gmx.net>:
[quoting me]
| >> Actually think you have run into a bug in Python's socket module.
| >> If it's convenient for you to build your own socket module, change
| >> it like this and see what happens (I'm looking at version 2.1 here.)
| >
| >> *** socketmodule.c.dist Sun Apr 15 17:21:33 2001
| >> --- socketmodule.c Thu Jun 20 10:10:12 2002
| >> ***************
| >> *** 597,602 ****
| >> --- 597,603 ----
| >> case AF_UNIX:
| >> {
| >> struct sockaddr_un *a = (struct sockaddr_un *) addr;
| >> + a->sun_path[addrlen - (sizeof(*a) -
| >> sizeof(a->sun_path))] = 0;
| >> return PyString_FromString(a->sun_path);
| >> }
| >> #endif
|
| why not simply use PyString_FromStringAndSize(const char *v, int len)?
|
| couln't you just file a patch on SF? should i do it?
PyString_FromStringAndSize is OK by me, and it's also fine with me if
you would like to submit a patch to Sourceforge.
Donn Cave, donn at u.washington.edu
More information about the Python-list
mailing list