• Michael W. Hudson's avatar
    Quality control, meet exceptions.c. · 22a80e7c
    Michael W. Hudson authored
    Fix a number of problems with the need for speed code:
    
    One is doing this sort of thing:
    
        Py_DECREF(self->field);
        self->field = newval;
        Py_INCREF(self->field);
    
    without being very sure that self->field doesn't start with a
    value that has a __del__, because that almost certainly can lead
    to segfaults.
    
    As self->args is constrained to be an exact tuple we may as well
    exploit this fact consistently.  This leads to quite a lot of
    simplification (and, hey, probably better performance).
    
    Add some error checking in places lacking it.
    
    Fix some rather strange indentation in the Unicode code.
    
    Delete some trailing whitespace.
    
    More to come, I haven't fixed all the reference leaks yet...
    22a80e7c
exceptions.c 58.1 KB