summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-05-21 07:49:18 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2013-05-21 07:49:18 (GMT)
commitc7c333d25d258187d71b6658e90796daba708912 (patch)
treec296f338290b15ee330eef4e891bfd10da9d206b /Modules
parent87ff387254d277b4faa6d4b9efca0a5361837404 (diff)
downloadcpython-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.c2
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 */