[Python-3000-checkins] r55900 - python/branches/py3k-struni/Python/symtable.c

walter.doerwald python-3000-checkins at python.org
Mon Jun 11 18:12:11 CEST 2007


Author: walter.doerwald
Date: Mon Jun 11 18:12:10 2007
New Revision: 55900

Modified:
   python/branches/py3k-struni/Python/symtable.c
Log:
Fix PyErr_Format() call (missing exception class).

Remove unused variable.


Modified: python/branches/py3k-struni/Python/symtable.c
==============================================================================
--- python/branches/py3k-struni/Python/symtable.c	(original)
+++ python/branches/py3k-struni/Python/symtable.c	Mon Jun 11 18:12:10 2007
@@ -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;
 	}


More information about the Python-3000-checkins mailing list