]> granicus.if.org Git - python/commitdiff
Fix bug reported by Just: anonymous arguments used for tuples should
authorGuido van Rossum <guido@python.org>
Thu, 10 Jul 1997 01:06:53 +0000 (01:06 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 10 Jul 1997 01:06:53 +0000 (01:06 +0000)
have a unique name, otherwise they get squished by locals2fast (or
fast2locals, I dunno) when the debugger is invoked before they have
been transferred to real locals.

Python/compile.c

index 36304e38e7392b9d96c69a81f6cbe16b76b673b5..5eb52d5f814725269269d3da1b876c30e3a6bba3 100644 (file)
@@ -2995,6 +2995,7 @@ com_arglist(c, n)
 {
        int nch, i;
        int complex = 0;
+       char nbuf[10];
        REQ(n, varargslist);
        /* varargslist:
                (fpdef ['=' test] ',')* (fpdef ['=' test] | '*' .....) */
@@ -3011,7 +3012,8 @@ com_arglist(c, n)
                if (TYPE(fp) == NAME)
                        name = STR(fp);
                else {
-                       name = "";
+                       name = nbuf;
+                       sprintf(nbuf, ".%d", i);
                        complex = 1;
                }
                com_newlocal(c, name);