[Python-checkins] r42773 - python/trunk/Python/exceptions.c
brett.cannon
python-checkins at python.org
Thu Mar 2 05:31:57 CET 2006
Author: brett.cannon
Date: Thu Mar 2 05:31:55 2006
New Revision: 42773
Modified:
python/trunk/Python/exceptions.c
Log:
Add a missing Py_DECREF to BaseException__unicode__ .
Modified: python/trunk/Python/exceptions.c
==============================================================================
--- python/trunk/Python/exceptions.c (original)
+++ python/trunk/Python/exceptions.c Thu Mar 2 05:31:55 2006
@@ -285,16 +285,22 @@
}
else if (args_len == 1) {
PyObject *temp = PySequence_GetItem(args, 0);
+ PyObject *unicode_obj;
+
if (!temp) {
Py_DECREF(args);
return NULL;
}
Py_DECREF(args);
- return PyObject_Unicode(temp);
+ unicode_obj = PyObject_Unicode(temp);
+ Py_DECREF(temp);
+ return unicode_obj;
}
else {
+ PyObject *unicode_obj = PyObject_Unicode(args);
+
Py_DECREF(args);
- return PyObject_Unicode(args);
+ return unicode_obj;
}
}
#endif /* Py_USING_UNICODE */
More information about the Python-checkins
mailing list