[Python-checkins] r69650 - in python/branches/io-c/Modules: _bufferedio.c _iobase.c

antoine.pitrou python-checkins at python.org
Sun Feb 15 21:11:57 CET 2009


Author: antoine.pitrou
Date: Sun Feb 15 21:11:56 2009
New Revision: 69650
Log:
Fix memory leak in BufferedWriter.truncate
Modified:
 python/branches/io-c/Modules/_bufferedio.c
 python/branches/io-c/Modules/_iobase.c
Modified: python/branches/io-c/Modules/_bufferedio.c
==============================================================================
--- python/branches/io-c/Modules/_bufferedio.c	(original)
+++ python/branches/io-c/Modules/_bufferedio.c	Sun Feb 15 21:11:56 2009
@@ -1014,9 +1014,6 @@
 return NULL;
 }
 
- if (pos != Py_None)
- Py_INCREF(pos);
-
 ENTER_BUFFERED(self)
 
 if (self->writable) {
Modified: python/branches/io-c/Modules/_iobase.c
==============================================================================
--- python/branches/io-c/Modules/_iobase.c	(original)
+++ python/branches/io-c/Modules/_iobase.c	Sun Feb 15 21:11:56 2009
@@ -101,7 +101,7 @@
 static PyObject *
 IOBase_truncate(PyObject *self, PyObject *args)
 {
- return IOBase_unsupported("seek");
+ return IOBase_unsupported("truncate");
 }
 
 /* Flush and close methods */


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /