summaryrefslogtreecommitdiffstats
path: root/Modules/datetimemodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-16 21:02:22 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-16 21:02:22 (GMT)
commit066100909ae45e7acd59b2ac81338d3cfcf44384 (patch)
treef4efeff775968cf39364638744cadd0fdc5fbfbd /Modules/datetimemodule.c
parent5f22af167f0a5cecdd79c9381e1150ab2b503be1 (diff)
downloadcpython-066100909ae45e7acd59b2ac81338d3cfcf44384.zip
cpython-066100909ae45e7acd59b2ac81338d3cfcf44384.tar.gz
cpython-066100909ae45e7acd59b2ac81338d3cfcf44384.tar.bz2
Get rid of some dead code and unneeded XXX comments by Neal.
Diffstat (limited to 'Modules/datetimemodule.c')
-rw-r--r--Modules/datetimemodule.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index 165ddbd..8b860e7 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -1159,17 +1159,12 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg)
if (Zreplacement == NULL)
return NULL;
if (PyUnicode_Check(Zreplacement)) {
- /* XXX(nnorwitz): this is really convoluted, is it correct? */
PyObject *Zreplacement2 =
_PyUnicode_AsDefaultEncodedString(Zreplacement, NULL);
if (Zreplacement2 == NULL)
return NULL;
Py_INCREF(Zreplacement2);
- /* Zreplacement is owned, but Zreplacement2 is borrowed.
- If they are different, we have to release Zreplacement. */
- if (Zreplacement != Zreplacement2) {
- Py_DECREF(Zreplacement);
- }
+ Py_DECREF(Zreplacement);
Zreplacement = Zreplacement2;
}
if (!PyString_Check(Zreplacement)) {