[Python-checkins] cpython: Issue #12442: nt._getdiskusage() is now using the Windows Unicode API

victor.stinner python-checkins at python.org
Wed Nov 9 22:12:30 CET 2011


http://hg.python.org/cpython/rev/bdb3f0e7e268
changeset: 73470:bdb3f0e7e268
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Wed Nov 09 22:14:14 2011 +0100
summary:
 Issue #12442: nt._getdiskusage() is now using the Windows Unicode API
files:
 Modules/posixmodule.c | 14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -8163,13 +8163,13 @@
 {
 BOOL retval;
 ULARGE_INTEGER _, total, free;
- LPCTSTR path;
-
- if (! PyArg_ParseTuple(args, "s", &path))
- return NULL;
-
- Py_BEGIN_ALLOW_THREADS
- retval = GetDiskFreeSpaceEx(path, &_, &total, &free);
+ const wchar_t *path;
+
+ if (! PyArg_ParseTuple(args, "u", &path))
+ return NULL;
+
+ Py_BEGIN_ALLOW_THREADS
+ retval = GetDiskFreeSpaceExW(path, &_, &total, &free);
 Py_END_ALLOW_THREADS
 if (retval == 0)
 return PyErr_SetFromWindowsErr(0);
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

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