objstr: split(): check arg type consistency (str vs bytes).

Similar to other methods and following CPython3 strictness.
pull/796/head
Paul Sokolovsky 2014-08-10 23:14:35 +03:00
rodzic ecca53bd34
commit 0c5498540b
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -472,6 +472,9 @@ STATIC mp_obj_t str_split(uint n_args, const mp_obj_t *args) {
} else {
// sep given
if (mp_obj_get_type(sep) != self_type) {
arg_type_mixup();
}
uint sep_len;
const char *sep_str = mp_obj_str_get_data(sep, &sep_len);