[Python-checkins] cpython: getpathp.c: fix compiler warning

victor.stinner python-checkins at python.org
Wed Mar 23 06:39:30 EDT 2016


https://hg.python.org/cpython/rev/3916033d4398
changeset:   100681:3916033d4398
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Mar 23 11:31:58 2016 +0100
summary:
  getpathp.c: fix compiler warning

wcsnlen_s() result type is size_t.

files:
  PC/getpathp.c |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/PC/getpathp.c b/PC/getpathp.c
--- a/PC/getpathp.c
+++ b/PC/getpathp.c
@@ -135,7 +135,7 @@
 static int
 ismodule(wchar_t *filename, int update_filename) /* Is module -- check for .pyc/.pyo too */
 {
-    int n;
+    size_t n;
 
     if (exists(filename))
         return 1;
@@ -553,7 +553,7 @@
                 envpath = NULL;
                 pythonhome = argv0_path;
             }
-            
+
             /* Look for a 'home' variable and set argv0_path to it, if found */
             if (find_env_config_value(env_file, L"home", tmpbuffer)) {
                 wcscpy_s(argv0_path, MAXPATHLEN+1, tmpbuffer);

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


More information about the Python-checkins mailing list