bpo-39770, array module: Remove unnecessary descriptor counting (GH-18675)
This commit is contained in:
parent
a6d3546d00
commit
702e09fd0a
|
@ -2991,7 +2991,6 @@ array_modexec(PyObject *m)
|
|||
{
|
||||
char buffer[Py_ARRAY_LENGTH(descriptors)], *p;
|
||||
PyObject *typecodes;
|
||||
Py_ssize_t size = 0;
|
||||
const struct arraydescr *descr;
|
||||
|
||||
if (PyType_Ready(&Arraytype) < 0)
|
||||
|
@ -3009,10 +3008,6 @@ array_modexec(PyObject *m)
|
|||
return -1;
|
||||
}
|
||||
|
||||
for (descr=descriptors; descr->typecode != '\0'; descr++) {
|
||||
size++;
|
||||
}
|
||||
|
||||
p = buffer;
|
||||
for (descr = descriptors; descr->typecode != '\0'; descr++) {
|
||||
*p++ = (char)descr->typecode;
|
||||
|
|
Loading…
Reference in New Issue