summaryrefslogtreecommitdiff
path: root/Objects/codeobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 12:04:23 +0000
committerVictor Stinner <victor.stinner@haypocalc.com>2010-10-15 12:04:23 +0000
commita47a00d4de1dba7e27eb086e9843d0e1592663ef (patch)
tree37168e66ffd361e7028543812b26de7e7da46017 /Objects/codeobject.c
parent9add3cda9de8882b78ac036ab30a3ed068ec1a73 (diff)
downloadcpython-a47a00d4de1dba7e27eb086e9843d0e1592663ef.tar.gz
Use locale encoding if Py_FileSystemDefaultEncoding is not set
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r--Objects/codeobject.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index 470bf56150..e24fc8d42b 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -5,8 +5,6 @@
#define NAME_CHARS \
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz"
-PyObject *_Py_code_object_list = NULL;
-
/* all_name_chars(s): true iff all chars in s are valid NAME_CHARS */
static int
@@ -111,17 +109,6 @@ PyCode_New(int argcount, int kwonlyargcount,
co->co_lnotab = lnotab;
co->co_zombieframe = NULL;
co->co_weakreflist = NULL;
-
- if (_Py_code_object_list != NULL) {
- int err;
- PyObject *ref = PyWeakref_NewRef((PyObject*)co, NULL);
- if (ref == NULL)
- goto error;
- err = PyList_Append(_Py_code_object_list, ref);
- Py_DECREF(ref);
- if (err)
- goto error;
- }
}
return co;