[Python-checkins] r73818 - in python/trunk: Doc/library/select.rst Modules/selectmodule.c
gregory.p.smith
python-checkins at python.org
Fri Jul 3 22:48:32 CEST 2009
Author: gregory.p.smith
Date: Fri Jul 3 22:48:31 2009
New Revision: 73818
Log:
Adds the select.PIPE_BUF attribute to expose the system constant.
Modified:
python/trunk/Doc/library/select.rst
python/trunk/Modules/selectmodule.c
Modified: python/trunk/Doc/library/select.rst
==============================================================================
--- python/trunk/Doc/library/select.rst (original)
+++ python/trunk/Doc/library/select.rst Fri Jul 3 22:48:31 2009
@@ -100,6 +100,15 @@
library, and does not handle file descriptors that don't originate from
WinSock.
+.. attribute:: select.PIPE_BUF
+
+ Files reported as ready for writing by :func:`select`, :func:`poll` or
+ similar interfaces in this module are guaranteed to not block on a write
+ of up to :const:`PIPE_BUF` bytes.
+ This value is guaranteed by POSIX to be at least 512.
+
+ .. versionadded:: 2.7
+
.. _epoll-objects:
Modified: python/trunk/Modules/selectmodule.c
==============================================================================
--- python/trunk/Modules/selectmodule.c (original)
+++ python/trunk/Modules/selectmodule.c Fri Jul 3 22:48:31 2009
@@ -1746,6 +1746,8 @@
Py_INCREF(SelectError);
PyModule_AddObject(m, "error", SelectError);
+ PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);
+
#if defined(HAVE_POLL)
#ifdef __APPLE__
if (select_have_broken_poll()) {
More information about the Python-checkins
mailing list