mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge ssize_t branch.
This commit is contained in:
parent
4482929734
commit
18e165558b
102 changed files with 2659 additions and 1677 deletions
|
@ -18,7 +18,7 @@ extern const char *PyWin_DLLVersionString;
|
|||
FILE *PyWin_FindRegisteredModule(const char *moduleName,
|
||||
struct filedescr **ppFileDesc,
|
||||
char *pathBuf,
|
||||
int pathLen)
|
||||
Py_ssize_t pathLen)
|
||||
{
|
||||
char *moduleKey;
|
||||
const char keyPrefix[] = "Software\\Python\\PythonCore\\";
|
||||
|
@ -53,13 +53,14 @@ FILE *PyWin_FindRegisteredModule(const char *moduleName,
|
|||
"Software\\Python\\PythonCore\\%s\\Modules\\%s%s",
|
||||
PyWin_DLLVersionString, moduleName, debugString);
|
||||
|
||||
modNameSize = pathLen;
|
||||
assert(pathLen < INT_MAX);
|
||||
modNameSize = (int)pathLen;
|
||||
regStat = RegQueryValue(keyBase, moduleKey, pathBuf, &modNameSize);
|
||||
if (regStat != ERROR_SUCCESS) {
|
||||
/* No user setting - lookup in machine settings */
|
||||
keyBase = HKEY_LOCAL_MACHINE;
|
||||
/* be anal - failure may have reset size param */
|
||||
modNameSize = pathLen;
|
||||
modNameSize = (int)pathLen;
|
||||
regStat = RegQueryValue(keyBase, moduleKey,
|
||||
pathBuf, &modNameSize);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue