[Python-3000-checkins] r58849 - python/branches/py3k-pep3137/Modules/_codecsmodule.c

christian.heimes python-3000-checkins at python.org
Mon Nov 5 02:09:39 CET 2007


Author: christian.heimes
Date: Mon Nov  5 02:09:39 2007
New Revision: 58849

Modified:
   python/branches/py3k-pep3137/Modules/_codecsmodule.c
Log:
Fix from Walter Doerwald (Thanks ;)
PyBytes_Resize() and _PyString_Resize differ in arguments and behavior. I forgot that the latter set the object to NULL.

Modified: python/branches/py3k-pep3137/Modules/_codecsmodule.c
==============================================================================
--- python/branches/py3k-pep3137/Modules/_codecsmodule.c	(original)
+++ python/branches/py3k-pep3137/Modules/_codecsmodule.c	Mon Nov  5 02:09:39 2007
@@ -213,7 +213,6 @@
 		}
 		*p = '\0';
 		if (_PyString_Resize(&v, (p - PyString_AS_STRING(v)))) {
-			Py_DECREF(v);
 			return NULL;
 		}
 	}


More information about the Python-3000-checkins mailing list