summaryrefslogtreecommitdiff
path: root/PC/getpathp.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-29 00:42:28 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-29 00:42:28 +0200
commit687c3b16f72a6b2b64971c1c27e33e27f001ede8 (patch)
tree9d9c6bedbf5f51f26a5f03a522eedddb852a3679 /PC/getpathp.c
parentea8093a66d771ae68b016c578c7b44be51c819b1 (diff)
downloadcpython-687c3b16f72a6b2b64971c1c27e33e27f001ede8.tar.gz
Use the new Py_ARRAY_LENGTH macro
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r--PC/getpathp.c6
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.