comparison configmix/_speedups.c @ 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 1b56b3cd4395
children a2fff0d93d83
comparison
equal deleted inserted replaced
600:9107ff0c5a63 601:1e7e06ff970a
474 Py_ssize_t i; 474 Py_ssize_t i;
475 PyObject *o; 475 PyObject *o;
476 PyObject *u; 476 PyObject *u;
477 struct speedups_state *sstate; 477 struct speedups_state *sstate;
478 478
479 if (!PyUnicode_Check(varname)) {
480 PyErr_SetString(PyExc_TypeError, "a (unicode) string type is expected");
481 return NULL;
482 }
483 varname_len = PyUnicode_GetLength(varname); 479 varname_len = PyUnicode_GetLength(varname);
484 if (varname_len < 0) { 480 if (varname_len < 0) {
485 return NULL; 481 return NULL;
486 } 482 }
487 if (varname_len == 0) { 483 if (varname_len == 0) {