Mercurial > hgrepos > Python > libs > ConfigMix
comparison configmix/_speedups.c @ 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 |
comparison
equal
deleted
inserted
replaced
| 543:491413368c7c | 544:db2d108e14e7 |
|---|---|
| 93 PyObject *pb; | 93 PyObject *pb; |
| 94 Py_ssize_t pb_len; | 94 Py_ssize_t pb_len; |
| 95 Py_ssize_t i; | 95 Py_ssize_t i; |
| 96 Py_UCS4 c; | 96 Py_UCS4 c; |
| 97 | 97 |
| 98 if (!PyUnicode_Check(s)) { | |
| 99 PyErr_SetString(PyExc_TypeError, "a (unicode) string type is expected"); | |
| 100 return NULL; | |
| 101 } | |
| 102 if (s_len < 0) { | 98 if (s_len < 0) { |
| 103 s_len = PyUnicode_GetLength(s); | 99 s_len = PyUnicode_GetLength(s); |
| 104 if (s_len < 0) { | 100 if (s_len < 0) { |
| 105 return NULL; | 101 return NULL; |
| 106 } | 102 } |
