diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-05-21 07:49:18 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-05-21 07:49:18 (GMT) |
commit | c7c333d25d258187d71b6658e90796daba708912 (patch) | |
tree | c296f338290b15ee330eef4e891bfd10da9d206b /Modules | |
parent | 87ff387254d277b4faa6d4b9efca0a5361837404 (diff) | |
download | cpython-c7c333d25d258187d71b6658e90796daba708912.zip cpython-c7c333d25d258187d71b6658e90796daba708912.tar.gz cpython-c7c333d25d258187d71b6658e90796daba708912.tar.bz2 |
Issue #17683: socket module: return AF_UNIX addresses in Linux abstract
namespace as string.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/socketmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 20db3d9..ae2924c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1018,7 +1018,7 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto) #ifdef linux if (a->sun_path[0] == 0) { /* Linux abstract namespace */ addrlen -= offsetof(struct sockaddr_un, sun_path); - return PyBytes_FromStringAndSize(a->sun_path, addrlen); + return PyUnicode_DecodeFSDefaultAndSize(a->sun_path, addrlen); } else #endif /* linux */ |