[Python-checkins] cpython (3.4): Closes #22568: fix UTIME_TO_* macros in posixmodule for rare cases.

georg.brandl python-checkins at python.org
Sun Oct 12 08:45:34 CEST 2014


https://hg.python.org/cpython/rev/922526816b25
changeset: 92971:922526816b25
branch: 3.4
parent: 92969:f33b4770a078
user: Georg Brandl <georg at python.org>
date: Sun Oct 12 08:45:15 2014 +0200
summary:
 Closes #22568: fix UTIME_TO_* macros in posixmodule for rare cases.
files:
 Modules/posixmodule.c | 12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4714,25 +4714,25 @@
 } \
 
 #define UTIME_TO_UTIMBUF \
- struct utimbuf u[2]; \
+ struct utimbuf u; \
 struct utimbuf *time; \
 if (ut->now) \
 time = NULL; \
 else { \
- u[0].actime = ut->atime_s; \
- u[0].modtime = ut->mtime_s; \
- time = u; \
+ u.actime = ut->atime_s; \
+ u.modtime = ut->mtime_s; \
+ time = &u; \
 }
 
 #define UTIME_TO_TIME_T \
 time_t timet[2]; \
- struct timet time; \
+ time_t *time; \
 if (ut->now) \
 time = NULL; \
 else { \
 timet[0] = ut->atime_s; \
 timet[1] = ut->mtime_s; \
- time = &timet; \
+ time = timet; \
 } \
 
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /