diff Objects/codeobject.c @ 65348:453fd8182c2f

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
author Victor Stinner <victor.stinner@haypocalc.com>
date Fri, 15 Oct 2010 12:04:23 +0000
parents 01b96f78fb70
children 6b8314376de2
line wrap: on
line diff
--- a/Objects/codeobject.c	Fri Oct 15 11:16:59 2010 +0000
+++ b/Objects/codeobject.c	Fri Oct 15 12:04:23 2010 +0000
@@ -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 @@
         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;