From e27f8a0a61e315ea1ff9aa4a01477d43f1edef6d Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Sun, 8 Jan 2017 01:11:27 +0100 Subject: Revert part of 3cb3e224b692 in code that I maintain. --- Modules/_testbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_testbuffer.c') diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c index 13d3cccfa4..43db8a8e53 100644 --- a/Modules/_testbuffer.c +++ b/Modules/_testbuffer.c @@ -13,7 +13,7 @@ PyObject *Struct = NULL; PyObject *calcsize = NULL; /* cache simple format string */ -static const char simple_fmt[] = "B"; +static const char *simple_fmt = "B"; PyObject *simple_format = NULL; #define SIMPLE_FORMAT(fmt) (fmt == NULL || strcmp(fmt, "B") == 0) #define FIX_FORMAT(fmt) (fmt == NULL ? "B" : fmt) -- cgit v1.2.1 From 0b95f201b7f904a8749eed20390e2b8164616c94 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Sun, 8 Jan 2017 01:36:00 +0100 Subject: Add comment why the change in d83884b3a427 wasn't necessary. --- Modules/_testbuffer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Modules/_testbuffer.c') diff --git a/Modules/_testbuffer.c b/Modules/_testbuffer.c index 43db8a8e53..4e1ce6851a 100644 --- a/Modules/_testbuffer.c +++ b/Modules/_testbuffer.c @@ -850,6 +850,7 @@ seq_as_ssize_array(PyObject *seq, Py_ssize_t len, int is_shape) Py_ssize_t *dest; Py_ssize_t x, i; + /* ndim = len <= ND_MAX_NDIM, so PyMem_New() is actually not needed. */ dest = PyMem_New(Py_ssize_t, len); if (dest == NULL) { PyErr_NoMemory(); -- cgit v1.2.1