[Python-3000-checkins] r57548 - python/branches/py3k/Objects/stringlib/string_format.h
neal.norwitz
python-3000-checkins at python.org
Mon Aug 27 05:22:50 CEST 2007
Author: neal.norwitz
Date: Mon Aug 27 05:22:50 2007
New Revision: 57548
Modified:
python/branches/py3k/Objects/stringlib/string_format.h
Log:
This adds a leak, but fixes a crash. The leaking code is:
"{0:.{precision}s}".format('hello world', precision=5)
I pretty sure it's because of the 'precision' keyword.
Still need to investigate further.
Modified: python/branches/py3k/Objects/stringlib/string_format.h
==============================================================================
--- python/branches/py3k/Objects/stringlib/string_format.h (original)
+++ python/branches/py3k/Objects/stringlib/string_format.h Mon Aug 27 05:22:50 2007
@@ -416,6 +416,7 @@
Py_DECREF(key);
goto error;
}
+ Py_INCREF(obj);
} else {
/* look up in args */
obj = PySequence_GetItem(args, index);
More information about the Python-3000-checkins
mailing list