mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Rename new macros to conform to naming rules (function macros have "Py" prefix, not "PY").
This commit is contained in:
parent
5ce1b0dbc0
commit
4cb0de246c
5 changed files with 20 additions and 20 deletions
|
@ -88,7 +88,7 @@ zipimporter_init(ZipImporter *self, PyObject *args, PyObject *kwds)
|
|||
"archive path too long");
|
||||
goto error;
|
||||
}
|
||||
if (!PyUnicode_AsUCS4(pathobj, buf, PY_ARRAY_LENGTH(buf), 1))
|
||||
if (!PyUnicode_AsUCS4(pathobj, buf, Py_ARRAY_LENGTH(buf), 1))
|
||||
goto error;
|
||||
|
||||
#ifdef ALTSEP
|
||||
|
@ -473,7 +473,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args)
|
|||
PyErr_SetString(ZipImportError, "path too long");
|
||||
return NULL;
|
||||
}
|
||||
if (!PyUnicode_AsUCS4(pathobj, buf, PY_ARRAY_LENGTH(buf), 1))
|
||||
if (!PyUnicode_AsUCS4(pathobj, buf, Py_ARRAY_LENGTH(buf), 1))
|
||||
return NULL;
|
||||
path = buf;
|
||||
#ifdef ALTSEP
|
||||
|
@ -484,7 +484,7 @@ zipimporter_get_data(PyObject *obj, PyObject *args)
|
|||
#endif
|
||||
len = PyUnicode_GET_LENGTH(self->archive);
|
||||
if ((size_t)len < Py_UCS4_strlen(path)) {
|
||||
if (!PyUnicode_AsUCS4(self->archive, archive, PY_ARRAY_LENGTH(archive), 1))
|
||||
if (!PyUnicode_AsUCS4(self->archive, archive, Py_ARRAY_LENGTH(archive), 1))
|
||||
return NULL;
|
||||
if (Py_UCS4_strncmp(path, archive, len) == 0 &&
|
||||
path[len] == SEP) {
|
||||
|
@ -771,7 +771,7 @@ read_directory(PyObject *archive)
|
|||
"Zip path name is too long");
|
||||
return NULL;
|
||||
}
|
||||
if (!PyUnicode_AsUCS4(archive, path, PY_ARRAY_LENGTH(path), 1))
|
||||
if (!PyUnicode_AsUCS4(archive, path, Py_ARRAY_LENGTH(path), 1))
|
||||
return NULL;
|
||||
|
||||
fp = _Py_fopen(archive, "rb");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue