[Python-checkins] cpython: Issue #9566: Fix compiler warning on Windows 64-bit
victor.stinner
python-checkins at python.org
Wed Jun 5 01:18:33 CEST 2013
http://hg.python.org/cpython/rev/88a21c5a97ef
changeset: 84034:88a21c5a97ef
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Jun 05 00:46:29 2013 +0200
summary:
Issue #9566: Fix compiler warning on Windows 64-bit
files:
Python/fileutils.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Python/fileutils.c b/Python/fileutils.c
--- a/Python/fileutils.c
+++ b/Python/fileutils.c
@@ -707,7 +707,8 @@
_Py_wgetcwd(wchar_t *buf, size_t size)
{
#ifdef MS_WINDOWS
- return _wgetcwd(buf, size);
+ int isize = (int)Py_MIN(size, INT_MAX);
+ return _wgetcwd(buf, isize);
#else
char fname[PATH_MAX];
wchar_t *wname;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list