[Python-checkins] cpython: removal u_qualname, since compiler_scope_qualname is only ever called once

benjamin.peterson python-checkins at python.org
Sat Oct 19 22:38:32 CEST 2013


http://hg.python.org/cpython/rev/b4a325275fb0
changeset:   86496:b4a325275fb0
user:        Benjamin Peterson <benjamin at python.org>
date:        Sat Oct 19 16:15:58 2013 -0400
summary:
  removal u_qualname, since compiler_scope_qualname is only ever called once

files:
  Python/compile.c |  8 --------
  1 files changed, 0 insertions(+), 8 deletions(-)


diff --git a/Python/compile.c b/Python/compile.c
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -104,7 +104,6 @@
     PySTEntryObject *u_ste;
 
     PyObject *u_name;
-    PyObject *u_qualname;  /* dot-separated qualified name (lazy) */
     int u_scope_type;
 
     /* The following fields are dicts that map objects to
@@ -507,7 +506,6 @@
     }
     Py_CLEAR(u->u_ste);
     Py_CLEAR(u->u_name);
-    Py_CLEAR(u->u_qualname);
     Py_CLEAR(u->u_consts);
     Py_CLEAR(u->u_names);
     Py_CLEAR(u->u_varnames);
@@ -660,11 +658,6 @@
     PyObject *capsule, *name, *seq, *dot_str, *locals_str;
 
     u = c->u;
-    if (u->u_qualname != NULL) {
-        Py_INCREF(u->u_qualname);
-        return u->u_qualname;
-    }
-
     seq = PyList_New(0);
     if (seq == NULL)
         return NULL;
@@ -714,7 +707,6 @@
         goto _error;
     name = PyUnicode_Join(dot_str, seq);
     Py_DECREF(seq);
-    u->u_qualname = name;
     Py_XINCREF(name);
     return name;
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list