bpo-39770, array module: Remove unnecessary descriptor counting (GH-18675)

This commit is contained in:
Andy Lester 2020-03-04 08:52:15 -06:00 committed by GitHub
parent a6d3546d00
commit 702e09fd0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -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;