changeset 544:db2d108e14e7

Type-check is implicitly done by other PyUnicode_NNN functions: skip the extra type-check
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 01 Jan 2022 18:05:32 +0100
parents 491413368c7c
children 6501fe0e116c
files configmix/_speedups.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/configmix/_speedups.c	Sat Jan 01 18:01:32 2022 +0100
+++ b/configmix/_speedups.c	Sat Jan 01 18:05:32 2022 +0100
@@ -95,10 +95,6 @@
     Py_ssize_t i;
     Py_UCS4 c;
 
-    if (!PyUnicode_Check(s)) {
-        PyErr_SetString(PyExc_TypeError, "a (unicode) string type is expected");
-        return NULL;
-    }
     if (s_len < 0) {
         s_len = PyUnicode_GetLength(s);
         if (s_len < 0) {