diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-29 00:42:28 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-29 00:42:28 +0200 |
commit | 687c3b16f72a6b2b64971c1c27e33e27f001ede8 (patch) | |
tree | 9d9c6bedbf5f51f26a5f03a522eedddb852a3679 /PC/getpathp.c | |
parent | ea8093a66d771ae68b016c578c7b44be51c819b1 (diff) | |
download | cpython-687c3b16f72a6b2b64971c1c27e33e27f001ede8.tar.gz |
Use the new Py_ARRAY_LENGTH macro
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r-- | PC/getpathp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index cd3a4b2504..8921aa01fa 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -251,7 +251,7 @@ getpythonregpath(HKEY keyBase, int skipcore) if (keyBuf==NULL) goto done; memcpy(keyBufPtr, keyPrefix, sizeof(keyPrefix)-sizeof(WCHAR)); - keyBufPtr += sizeof(keyPrefix)/sizeof(WCHAR) - 1; + keyBufPtr += Py_ARRAY_LENGTH(keyPrefix) - 1; mbstowcs(keyBufPtr, PyWin_DLLVersionString, versionLen); keyBufPtr += versionLen; /* NULL comes with this one! */ @@ -708,8 +708,8 @@ Py_GetProgramFullPath(void) return progpath; } -/* Load python3.dll before loading any extension module that might refer - to it. That way, we can be sure that always the python3.dll corresponding +/* Load python3.dll before loading any extension module that might refer + to it. That way, we can be sure that always the python3.dll corresponding to this python DLL is loaded, not a python3.dll that might be on the path by chance. Return whether the DLL was found. |