]> granicus.if.org Git - python/commitdiff
Fix issue #17996: expose socket.AF_LINK constant on BSD and OSX.
authorGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 21 May 2013 19:02:04 +0000 (21:02 +0200)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Tue, 21 May 2013 19:02:04 +0000 (21:02 +0200)
Doc/library/socket.rst
Misc/NEWS
Modules/socketmodule.c

index aa59f7fc439cb3014c6110137de93b8e6e987db4..edd196a89bac7daa5395b122c86221ae33538d11 100644 (file)
@@ -293,6 +293,11 @@ The module :mod:`socket` exports the following constants and functions:
    TIPC related constants, matching the ones exported by the C socket API. See
    the TIPC documentation for more information.
 
+.. data:: AF_LINK
+
+  Availability: BSD, OSX.
+
+  .. versionadded:: 3.4
 
 .. data:: has_ipv6
 
index 2027e65f3e84ebbf7cc45cc7be46a86d68cbe995..a025c7073edbe068f97af5d9957102cf556dc58f 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -99,6 +99,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX.
+
 - Issue #17900: Allowed pickling of recursive OrderedDicts.  Decreased pickled
   size and pickling time.
 
index 20db3d94641c8f9a47d0b20684bbf022f8fbe03d..fa75a102f24f2a4ca2ce5b75aa11c2b04944cfe0 100644 (file)
@@ -5658,6 +5658,9 @@ PyInit__socket(void)
     /* Alias to emulate 4.4BSD */
     PyModule_AddIntMacro(m, AF_ROUTE);
 #endif
+#ifdef AF_LINK
+    PyModule_AddIntMacro(m, AF_LINK);
+#endif
 #ifdef AF_ASH
     /* Ash */
     PyModule_AddIntMacro(m, AF_ASH);