]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Bug #1356: Avoid using the C99 keyword 'restrict'.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 29 Oct 2007 19:54:24 +0000 (19:54 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 29 Oct 2007 19:54:24 +0000 (19:54 +0000)
Python/symtable.c

index 83e571e6747118085480b5607f514af54bd1488d..968fe2522ea58844010970096880ecb907c80d78 100644 (file)
@@ -465,12 +465,12 @@ analyze_name(PySTEntryObject *ste, PyObject *scopes, PyObject *name, long flags,
    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 @@ analyze_cells(PyObject *scopes, PyObject *free, const char *restrict)
                        continue;
                if (!PySet_Contains(free, name))
                        continue;
-               if (restrict != NULL &&
-                    PyUnicode_CompareWithASCIIString(name, restrict))
+               if (restricted != NULL &&
+                    PyUnicode_CompareWithASCIIString(name, restricted))
                        continue;
                /* Replace LOCAL with CELL for this name, and remove
                   from free. It is safe to replace the value of name