[Python-checkins] cpython: Issue #23152: Move declarations back to posixmodule.c.

serhiy.storchaka python-checkins at python.org
Sun Feb 22 20:35:39 CET 2015


https://hg.python.org/cpython/rev/72cf174cc0eb
changeset:   94726:72cf174cc0eb
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Feb 22 21:34:54 2015 +0200
summary:
  Issue #23152: Move declarations back to posixmodule.c.

Declarations of Windows-specific auxilary functions need Windows types
from windows.h.  Instead of including windows.h in Python.h and making
it available to all Windows users, it is simpler and safer just move
declarations to the single file that needs them.

files:
  Include/fileutils.h   |  4 ----
  Modules/posixmodule.c |  6 ++++++
  2 files changed, 6 insertions(+), 4 deletions(-)


diff --git a/Include/fileutils.h b/Include/fileutils.h
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -42,10 +42,6 @@
     int st_ctime_nsec;
     unsigned long st_file_attributes;
 };
-
-PyAPI_FUNC(void) _Py_time_t_to_FILE_TIME(time_t, int, FILETIME *);
-PyAPI_FUNC(void) _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *,
-                                            ULONG, struct _Py_stat_struct *);
 #else
 #  define _Py_stat_struct stat
 #endif
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -372,6 +372,12 @@
 
 #define DWORD_MAX 4294967295U
 
+#ifdef MS_WINDOWS
+/* defined in fileutils.c */
+PyAPI_FUNC(void) _Py_time_t_to_FILE_TIME(time_t, int, FILETIME *);
+PyAPI_FUNC(void) _Py_attribute_data_to_stat(BY_HANDLE_FILE_INFORMATION *,
+                                            ULONG, struct _Py_stat_struct *);
+#endif
 
 #ifdef MS_WINDOWS
 static int

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list