Kaydet (Commit) b970b869 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

Merged revisions 73818 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r73818 | gregory.p.smith | 2009-07-03 13:48:31 -0700 (Fri, 03 Jul 2009) | 2 lines

  Adds the select.PIPE_BUF attribute to expose the system constant.
........
üst 05bf01ae
...@@ -94,6 +94,15 @@ The module defines the following: ...@@ -94,6 +94,15 @@ The module defines the following:
library, and does not handle file descriptors that don't originate from library, and does not handle file descriptors that don't originate from
WinSock. 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: .. _epoll-objects:
......
...@@ -1764,6 +1764,8 @@ PyInit_select(void) ...@@ -1764,6 +1764,8 @@ PyInit_select(void)
Py_INCREF(SelectError); Py_INCREF(SelectError);
PyModule_AddObject(m, "error", SelectError); PyModule_AddObject(m, "error", SelectError);
PyModule_AddIntConstant(m, "PIPE_BUF", PIPE_BUF);
#if defined(HAVE_POLL) #if defined(HAVE_POLL)
#ifdef __APPLE__ #ifdef __APPLE__
if (select_have_broken_poll()) { if (select_have_broken_poll()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment