summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/import_nt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/PC/import_nt.c b/PC/import_nt.c
index dfbf054..b9b36dc 100644
--- a/PC/import_nt.c
+++ b/PC/import_nt.c
@@ -86,12 +86,11 @@ _PyWin_FindRegisteredModule(PyObject *moduleName,
suffix = PyUnicode_FromString(fdp->suffix);
if (suffix == NULL)
return NULL;
- wsuffix = PyUnicode_AsUnicode(suffix);
+ wsuffix = PyUnicode_AsUnicodeAndSize(suffix, &extLen);
if (wsuffix == NULL) {
Py_DECREF(suffix);
return NULL;
}
- extLen = PyUnicode_GET_SIZE(suffix);
if ((Py_ssize_t)modNameSize > extLen &&
_wcsnicmp(pathBuf + ((Py_ssize_t)modNameSize-extLen-1),
wsuffix,