changeset 601:1e7e06ff970a

Remove the PyUnicode_Check() because it is implicitely done by the PyUnicode_GetLength() call
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 11 Jan 2022 00:45:33 +0100
parents 9107ff0c5a63
children a2fff0d93d83
files configmix/_speedups.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configmix/_speedups.c	Mon Jan 10 17:17:20 2022 +0100
+++ b/configmix/_speedups.c	Tue Jan 11 00:45:33 2022 +0100
@@ -476,10 +476,6 @@
     PyObject *u;
     struct speedups_state *sstate;
 
-    if (!PyUnicode_Check(varname)) {
-        PyErr_SetString(PyExc_TypeError, "a (unicode) string type is expected");
-        return NULL;
-    }
     varname_len = PyUnicode_GetLength(varname);
     if (varname_len < 0) {
         return NULL;