[Python-checkins] r83227 - python/branches/py3k/Objects/unicodeobject.c
georg.brandl
python-checkins at python.org
Thu Jul 29 16:23:06 CEST 2010
Author: georg.brandl
Date: Thu Jul 29 16:23:06 2010
New Revision: 83227
Log:
Use Py_CLEAR().
Modified:
python/branches/py3k/Objects/unicodeobject.c
Modified: python/branches/py3k/Objects/unicodeobject.c
==============================================================================
--- python/branches/py3k/Objects/unicodeobject.c (original)
+++ python/branches/py3k/Objects/unicodeobject.c Thu Jul 29 16:23:06 2010
@@ -307,8 +307,7 @@
reset:
/* Reset the object caches */
if (unicode->defenc) {
- Py_DECREF(unicode->defenc);
- unicode->defenc = NULL;
+ Py_CLEAR(unicode->defenc);
}
unicode->hash = -1;
@@ -427,8 +426,7 @@
unicode->length = 0;
}
if (unicode->defenc) {
- Py_DECREF(unicode->defenc);
- unicode->defenc = NULL;
+ Py_CLEAR(unicode->defenc);
}
/* Add to free list */
*(PyUnicodeObject **)unicode = free_list;
More information about the Python-checkins
mailing list