mirror of
https://github.com/python/cpython.git
synced 2025-10-08 16:11:51 +00:00
bpo-39770, array module: Remove unnecessary descriptor counting (GH-18675)
This commit is contained in:
parent
a6d3546d00
commit
702e09fd0a
1 changed files with 0 additions and 5 deletions
|
@ -2991,7 +2991,6 @@ array_modexec(PyObject *m)
|
||||||
{
|
{
|
||||||
char buffer[Py_ARRAY_LENGTH(descriptors)], *p;
|
char buffer[Py_ARRAY_LENGTH(descriptors)], *p;
|
||||||
PyObject *typecodes;
|
PyObject *typecodes;
|
||||||
Py_ssize_t size = 0;
|
|
||||||
const struct arraydescr *descr;
|
const struct arraydescr *descr;
|
||||||
|
|
||||||
if (PyType_Ready(&Arraytype) < 0)
|
if (PyType_Ready(&Arraytype) < 0)
|
||||||
|
@ -3009,10 +3008,6 @@ array_modexec(PyObject *m)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (descr=descriptors; descr->typecode != '\0'; descr++) {
|
|
||||||
size++;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = buffer;
|
p = buffer;
|
||||||
for (descr = descriptors; descr->typecode != '\0'; descr++) {
|
for (descr = descriptors; descr->typecode != '\0'; descr++) {
|
||||||
*p++ = (char)descr->typecode;
|
*p++ = (char)descr->typecode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue