diff Python/ceval.c @ 73738:e1dbc72bd97f

PEP 3155 / issue #13448: Qualified name for classes and functions.
author Antoine Pitrou <solipsis@pitrou.net>
date Fri, 25 Nov 2011 18:56:07 +0100
parents db4aa878cea2
children d64ac9ab4cd0
line wrap: on
line diff
--- a/Python/ceval.c	Fri Nov 25 18:03:09 2011 +0100
+++ b/Python/ceval.c	Fri Nov 25 18:56:07 2011 +0100
@@ -2687,9 +2687,11 @@
             int kwdefaults = (oparg>>8) & 0xff;
             int num_annotations = (oparg >> 16) & 0x7fff;
 
+            w = POP(); /* qualname */
             v = POP(); /* code object */
-            x = PyFunction_New(v, f->f_globals);
+            x = PyFunction_NewWithQualName(v, f->f_globals, w);
             Py_DECREF(v);
+            Py_DECREF(w);
 
             if (x != NULL && opcode == MAKE_CLOSURE) {
                 v = POP();