summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-11-21 01:49:52 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-11-21 01:49:52 (GMT)
commit9e30aa52fd416e17b692c4f22e57191cdd6ec654 (patch)
treef3b1c85f5cdbb6a32ec8f309400e8d3e1c2bbfaf /PC
parentf3ae6208c706bae89d86df44c7c3dcac1bdcd94d (diff)
downloadcpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.zip
cpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.gz
cpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.bz2
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
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,