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

martin.v.loewis python-3000-checkins at python.org
Mon Oct 29 20:54:25 CET 2007

Author: martin.v.loewis
Date: Mon Oct 29 20:54:24 2007
New Revision: 58705

Bug #1356: Avoid using the C99 keyword 'restrict'.

Modified: python/branches/py3k/Python/symtable.c
--- python/branches/py3k/Python/symtable.c	(original)
+++ python/branches/py3k/Python/symtable.c	Mon Oct 29 20:54:24 2007
@@ -465,12 +465,12 @@
    Note that the current block's free variables are included in free.
    That's safe because no name can be free and local in the same scope.
-   The 'restrict' argument may be set to a string to restrict the analysis
+   The 'restricted' argument may be set to a string to restrict the analysis
    to the one variable whose name equals that string (e.g. "__class__").
 static int
-analyze_cells(PyObject *scopes, PyObject *free, const char *restrict)
+analyze_cells(PyObject *scopes, PyObject *free, const char *restricted)
         PyObject *name, *v, *v_cell;
 	int success = 0;
@@ -487,8 +487,8 @@
 		if (!PySet_Contains(free, name))
-		if (restrict != NULL &&
-                    PyUnicode_CompareWithASCIIString(name, restrict))
+		if (restricted != NULL &&
+                    PyUnicode_CompareWithASCIIString(name, restricted))
 		/* Replace LOCAL with CELL for this name, and remove
 		   from free. It is safe to replace the value of name 

More information about the Python-3000-checkins mailing list