• Guido van Rossum's avatar
    Fix the bug Jeremy was experiencing: both the close() and the · 15a40394
    Guido van Rossum authored
    dealloc() functions contained code to free/DECREF the buffer
    (there were differences between I and O objects but the logic bug was
    the same).  Fixed this be setting the buffer pointer to NULL and
    testing for that.  (This also makes it safe to call close() more than
    once.)
    
    XXX Worry: what if you try to read() or write() once the thing is
    closed?
    15a40394
cStringIO.c 17.8 KB