commit | 15a40394b0c21829ba9afbb739b2038b8211dabe | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Wed Sep 03 00:09:26 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Wed Sep 03 00:09:26 1997 +0000 |
tree | 007e934a360eeac8e87c76c0327d960db81c5fb4 | |
parent | 2d30840b92d19f2229da75f47a5c7e8cbd254981 [diff] |
Fix the bug Jeremy was experiencing: both the close() and the 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?