summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-04-01 07:33:08 (GMT)
committerGeorg Brandl <georg@python.org>2006-04-01 07:33:08 (GMT)
commitdcfdae7d72177d2897e3bd0eb4d3ef19dc51df08 (patch)
treee3c76b51f0dcc1e4c51c6b907262c4ea5efd0211 /Modules
parente071b001cacb81202fba0d20c03f45a9bd60d78d (diff)
downloadcpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.zip
cpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.tar.gz
cpython-dcfdae7d72177d2897e3bd0eb4d3ef19dc51df08.tar.bz2
Bug #1460564: document that socket.fromfd() duplicates the given
file descriptor.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 6ba076a..af46921 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3168,7 +3168,8 @@ socket_fromfd(PyObject *self, PyObject *args)
PyDoc_STRVAR(fromfd_doc,
"fromfd(fd, family, type[, proto]) -> socket object\n\
\n\
-Create a socket object from the given file descriptor.\n\
+Create a socket object from a duplicate of the given\n\
+file descriptor.\n\
The remaining arguments are the same as for socket().");
#endif /* NO_DUP */
@@ -4052,7 +4053,7 @@ init_socket(void)
PyModule_AddIntConstant(m, "NETLINK_IP6_FW", NETLINK_IP6_FW);
PyModule_AddIntConstant(m, "NETLINK_DNRTMSG", NETLINK_DNRTMSG);
PyModule_AddIntConstant(m, "NETLINK_TAPBASE", NETLINK_TAPBASE);
-#endif
+#endif /* AF_NETLINK */
#ifdef AF_ROUTE
/* Alias to emulate 4.4BSD */
PyModule_AddIntConstant(m, "AF_ROUTE", AF_ROUTE);