Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
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 @@
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,