diff options
author | Guido van Rossum <guido@python.org> | 2000-06-28 22:20:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-06-28 22:20:06 (GMT) |
commit | 1c44e287669c27f4e4f5df6925899d15d8999c12 (patch) | |
tree | 1252511c8053e7081dab87d2fc8f5cdcc3642fc7 /PC/import_nt.c | |
parent | ab43fcad5fadc03b1cd060e790325ccf39f7593e (diff) | |
download | cpython-1c44e287669c27f4e4f5df6925899d15d8999c12.zip cpython-1c44e287669c27f4e4f5df6925899d15d8999c12.tar.gz cpython-1c44e287669c27f4e4f5df6925899d15d8999c12.tar.bz2 |
Trent Mick: familiar simple Win64 patches
Diffstat (limited to 'PC/import_nt.c')
-rw-r--r-- | PC/import_nt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/PC/import_nt.c b/PC/import_nt.c index 2fe44b6..a31ef30 100644 --- a/PC/import_nt.c +++ b/PC/import_nt.c @@ -33,7 +33,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF // Calculate the size for the sprintf buffer. // Get the size of the chars only, plus 1 NULL. - int bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; + size_t bufSize = sizeof(keyPrefix)-1 + strlen(PyWin_DLLVersionString) + sizeof(keySuffix) + strlen(moduleName) + sizeof(debugString) - 1; // alloca == no free required, but memory only local to fn, also no heap fragmentation! moduleKey = alloca(bufSize); sprintf(moduleKey, "Software\\Python\\PythonCore\\%s\\Modules\\%s%s", PyWin_DLLVersionString, moduleName, debugString); @@ -44,7 +44,7 @@ FILE *PyWin_FindRegisteredModule( const char *moduleName, struct filedescr **ppF return NULL; // use the file extension to locate the type entry. for (fdp = _PyImport_Filetab; fdp->suffix != NULL; fdp++) { - int extLen=strlen(fdp->suffix); + size_t extLen = strlen(fdp->suffix); if (modNameSize>extLen && strnicmp(pathBuf+(modNameSize-extLen-1),fdp->suffix,extLen)==0) break; } |