[Python-checkins] cpython: expose O_PATH if possible
benjamin.peterson
python-checkins at python.org
Wed Mar 13 16:27:53 CET 2013
http://hg.python.org/cpython/rev/38e263d40d81
changeset: 82641:38e263d40d81
user: Benjamin Peterson <benjamin at python.org>
date: Wed Mar 13 10:27:41 2013 -0500
summary:
expose O_PATH if possible
files:
Doc/library/os.rst | 1 +
Misc/NEWS | 2 ++
Modules/posixmodule.c | 3 +++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -1137,6 +1137,7 @@
O_DIRECTORY
O_NOFOLLOW
O_NOATIME
+ O_PATH
These constants are GNU extensions and not present if they are not defined by
the C library.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -277,6 +277,8 @@
Library
-------
+- Expose the O_PATH constant in the os module if it is available.
+
- Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
a failure while decoding empty object literals when object_pairs_hook was
specified.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -10858,6 +10858,9 @@
#ifdef O_SEARCH
if (ins(d, "O_SEARCH", (long)O_SEARCH)) return -1;
#endif
+#ifdef O_PATH
+ if (ins(d, "O_PATH", (long)O_PATH)) return -1;
+#endif
#ifdef O_TTY_INIT
if (ins(d, "O_TTY_INIT", (long)O_TTY_INIT)) return -1;
#endif
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list