[Python-checkins] r83298 - python/branches/import_unicode/Objects/codeobject.c
victor.stinner
python-checkins at python.org
Fri Jul 30 22:13:37 CEST 2010
Author: victor.stinner
Date: Fri Jul 30 22:13:37 2010
New Revision: 83298
Log:
document and simplify _Py_code_object_list
Modified:
python/branches/import_unicode/Objects/codeobject.c
Modified: python/branches/import_unicode/Objects/codeobject.c
==============================================================================
--- python/branches/import_unicode/Objects/codeobject.c (original)
+++ python/branches/import_unicode/Objects/codeobject.c Fri Jul 30 22:13:37 2010
@@ -5,6 +5,9 @@
#define NAME_CHARS \
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
+/* List of all code objects used to reencode code filenames at startup when the
+ * file system encoding is changed. After startup, the list is no more used (it
+ * is set to NULL). */
PyObject *_Py_code_object_list = NULL;
/* all_name_chars(s): true iff all chars in s are valid NAME_CHARS */
@@ -46,10 +49,7 @@
void _PyCode_ClearList(void)
{
- if (_Py_code_object_list == NULL)
- return;
- Py_DECREF(_Py_code_object_list);
- _Py_code_object_list = NULL;
+ Py_CLEAR(_Py_code_object_list);
}
PyCodeObject *
More information about the Python-checkins
mailing list