diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 +0000 |
commit | 26a6348f77faff1083d501950812ea9f68eb9547 (patch) | |
tree | 8aebd3631f3b60d9753cd8271c0ad7c1379af1a2 /PC/getpathp.c | |
parent | ad4cf65e988f853a3b32a7da30198ce9c6c73c02 (diff) | |
download | cpython-26a6348f77faff1083d501950812ea9f68eb9547.tar.gz |
Merge ssize_t branch.
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r-- | PC/getpathp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index 3b4f45277c..0701d73154 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -169,7 +169,8 @@ join(char *buffer, char *stuff) static int gotlandmark(char *landmark) { - int n, ok; + int ok; + Py_ssize_t n; n = strlen(prefix); join(prefix, landmark); @@ -302,10 +303,11 @@ getpythonregpath(HKEY keyBase, int skipcore) dataSize--; } if (ppPaths[index]) { - int len = _tcslen(ppPaths[index]); + Py_ssize_t len = _tcslen(ppPaths[index]); _tcsncpy(szCur, ppPaths[index], len); szCur += len; - dataSize -= len; + assert(dataSize > len); + dataSize -= (int)len; } } if (skipcore) @@ -632,7 +634,7 @@ calculate_path(void) char lookBuf[MAXPATHLEN+1]; char *look = buf - 1; /* 'buf' is at the end of the buffer */ while (1) { - int nchars; + Py_ssize_t nchars; char *lookEnd = look; /* 'look' will end up one character before the start of the path in question - even if this |