Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 42045:171f0e073671
Fix PyErr_Format() call (missing exception class).
Remove unused variable.
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Mon, 11 Jun 2007 16:12:10 +0000 |
| parents | faa626d6e675 |
| children | 229c28cb9afb |
line wrap: on
line diff
--- a/Python/symtable.c Mon Jun 11 16:08:41 2007 +0000 +++ b/Python/symtable.c Mon Jun 11 16:12:10 2007 +0000 @@ -502,7 +502,6 @@ /* Check for illegal statements in unoptimized namespaces */ static int check_unoptimized(const PySTEntryObject* ste) { - char buf[300]; const char* trailer; if (ste->ste_type != FunctionBlock || !ste->ste_unoptimized @@ -517,8 +516,8 @@ case OPT_TOPLEVEL: /* import * at top-level is fine */ return 1; case OPT_IMPORT_STAR: - PyErr_Format("import * is not allowed in function '%U' " - "because it %s", + PyErr_Format(PyExc_SyntaxError, + "import * is not allowed in function '%U' because it %s", ste->ste_name, trailer); break; }
