[Python-checkins] cpython: #26907: add some missing getsockopt constants.
r.david.murray
python-checkins at python.org
Tue Aug 23 21:12:51 EDT 2016
https://hg.python.org/cpython/rev/ed5f5d490490
changeset: 102881:ed5f5d490490
user: R David Murray <rdmurray at bitdance.com>
date: Tue Aug 23 21:12:40 2016 -0400
summary:
#26907: add some missing getsockopt constants.
Patch by Christian Heimes, reviewed by Martin Panter.
files:
Doc/library/socket.rst | 4 ++++
Doc/whatsnew/3.6.rst | 4 ++++
Modules/socketmodule.c | 12 ++++++++++++
3 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -281,6 +281,10 @@
in the Unix header files are defined; for a few symbols, default values are
provided.
+ .. versionchanged:: 3.6
+ ``SO_DOMAIN``, ``SO_PROTOCOL``, ``SO_PEERSEC``, ``SO_PASSSEC``
+ were added.
+
.. data:: AF_CAN
PF_CAN
SOL_CAN_*
diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst
--- a/Doc/whatsnew/3.6.rst
+++ b/Doc/whatsnew/3.6.rst
@@ -406,6 +406,10 @@
control code.
(Contributed by Daniel Stokes in :issue:`26536`.)
+The :meth:`~socket.socket.getsockopt` constants ``SO_DOMAIN``,
+``SO_PROTOCOL``, ``SO_PEERSEC``, and ``SO_PASSSEC`` are now supported.
+(Contributed by Christian Heimes in :issue:`26907`.)
+
socketserver
------------
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -6582,6 +6582,12 @@
#ifdef LOCAL_PEERCRED
PyModule_AddIntMacro(m, LOCAL_PEERCRED);
#endif
+#ifdef SO_PASSSEC
+ PyModule_AddIntMacro(m, SO_PASSSEC);
+#endif
+#ifdef SO_PEERSEC
+ PyModule_AddIntMacro(m, SO_PEERSEC);
+#endif
#ifdef SO_BINDTODEVICE
PyModule_AddIntMacro(m, SO_BINDTODEVICE);
#endif
@@ -6591,6 +6597,12 @@
#ifdef SO_MARK
PyModule_AddIntMacro(m, SO_MARK);
#endif
+#ifdef SO_DOMAIN
+ PyModule_AddIntMacro(m, SO_DOMAIN);
+#endif
+#ifdef SO_PROTOCOL
+ PyModule_AddIntMacro(m, SO_PROTOCOL);
+#endif
/* Maximum number of connections for "listen" */
#ifdef SOMAXCONN
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list