summaryrefslogtreecommitdiff
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2020-03-04 08:52:15 -0600
committerGitHub <noreply@github.com>2020-03-04 15:52:15 +0100
commit702e09fd0ad72b248b5adfa0fcfdb58600be77f6 (patch)
treecd5d37345071729547b7b0a52c5931f74ba25606 /Modules/arraymodule.c
parenta6d3546d003d9873de0f71b319ad79d203374bf0 (diff)
downloadcpython-git-702e09fd0ad72b248b5adfa0fcfdb58600be77f6.tar.gz
bpo-39770, array module: Remove unnecessary descriptor counting (GH-18675)
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index b41ba0523b..95ee5f881c 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -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;