mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Bug #1356: Avoid using the C99 keyword 'restrict'.
This commit is contained in:
parent
6203d8fa11
commit
2673a57234
1 changed files with 4 additions and 4 deletions
|
@ -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.
|
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.
|
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__").
|
to the one variable whose name equals that string (e.g. "__class__").
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
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;
|
PyObject *name, *v, *v_cell;
|
||||||
int success = 0;
|
int success = 0;
|
||||||
|
@ -487,8 +487,8 @@ analyze_cells(PyObject *scopes, PyObject *free, const char *restrict)
|
||||||
continue;
|
continue;
|
||||||
if (!PySet_Contains(free, name))
|
if (!PySet_Contains(free, name))
|
||||||
continue;
|
continue;
|
||||||
if (restrict != NULL &&
|
if (restricted != NULL &&
|
||||||
PyUnicode_CompareWithASCIIString(name, restrict))
|
PyUnicode_CompareWithASCIIString(name, restricted))
|
||||||
continue;
|
continue;
|
||||||
/* Replace LOCAL with CELL for this name, and remove
|
/* Replace LOCAL with CELL for this name, and remove
|
||||||
from free. It is safe to replace the value of name
|
from free. It is safe to replace the value of name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue