• Marius Wachtler's avatar
    str: use tp_as_sequence instead of tp_as_number · 19bf0665
    Marius Wachtler authored
    string is special in that it is a c++ type which has tp_as_number and tp_as_sequence.
    This causes problems because when we fixup the slot dispatcher we will set the tp_as_number fields but not the
    tp_as_sequence because setting both can cause problems.
    Some extensions (e.g. numpy) require that we use the sq_* functions instead of nb_*.
    Therefore clear the tp_as_number fields (except nb_remainder which cpython has set too because it is not part of
    tp_as_sequence).
    19bf0665
stringobject.c 29.2 KB