]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
removal u_qualname, since compiler_scope_qualname is only ever called once
authorBenjamin Peterson <benjamin@python.org>
Sat, 19 Oct 2013 20:15:58 +0000 (16:15 -0400)
committerBenjamin Peterson <benjamin@python.org>
Sat, 19 Oct 2013 20:15:58 +0000 (16:15 -0400)
Python/compile.c

index 9176e3131db76355bf4f9f98070e92640e28ed10..eeccd111700217d1ae449d618d6be14caa9b4486 100644 (file)
@@ -104,7 +104,6 @@ struct compiler_unit {
     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 @@ compiler_unit_free(struct compiler_unit *u)
     }
     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 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name)
     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 @@ compiler_scope_qualname(struct compiler *c, identifier scope_name)
         goto _error;
     name = PyUnicode_Join(dot_str, seq);
     Py_DECREF(seq);
-    u->u_qualname = name;
     Py_XINCREF(name);
     return name;