Skip to content

Commit 1d33fe0

Browse files
committed
Rename 'restricted' to 'restrict' in _interpretersmodule.c
1 parent be56464 commit 1d33fe0

File tree

2 files changed

+93
-93
lines changed

2 files changed

+93
-93
lines changed

Modules/_interpretersmodule.c

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ get_whence(PyInterpreterState *interp)
742742

743743

744744
static PyInterpreterState *
745-
resolve_interp(PyObject *idobj, int restricted, int reqready, const char *op)
745+
resolve_interp(PyObject *idobj, int restrict, int reqready, const char *op)
746746
{
747747
PyInterpreterState *interp;
748748
if (idobj == NULL) {
@@ -767,7 +767,7 @@ resolve_interp(PyObject *idobj, int restricted, int reqready, const char *op)
767767
return NULL;
768768
}
769769

770-
if (restricted && get_whence(interp) != _PyInterpreterState_WHENCE_STDLIB) {
770+
if (restrict && get_whence(interp) != _PyInterpreterState_WHENCE_STDLIB) {
771771
if (idobj == NULL) {
772772
PyErr_Format(PyExc_InterpreterError,
773773
"cannot %s unrecognized current interpreter", op);
@@ -907,7 +907,7 @@ _interpreters_create_impl(PyObject *module, PyObject *configobj, int reqrefs)
907907
_interpreters.destroy
908908
id: object
909909
*
910-
restrict as restricted: bool = False
910+
restrict: bool = False
911911
912912
Destroy the identified interpreter.
913913
@@ -916,13 +916,13 @@ So does an unrecognized ID.
916916
[clinic start generated code]*/
917917

918918
static PyObject *
919-
_interpreters_destroy_impl(PyObject *module, PyObject *id, int restricted)
920-
/*[clinic end generated code: output=0bc20da8700ab4dd input=561bdd6537639d40]*/
919+
_interpreters_destroy_impl(PyObject *module, PyObject *id, int restrict)
920+
/*[clinic end generated code: output=3887e3c350597df5 input=43fd109df8e851f9]*/
921921
{
922922
// Look up the interpreter.
923923
int reqready = 0;
924924
PyInterpreterState *interp = \
925-
resolve_interp(id, restricted, reqready, "destroy");
925+
resolve_interp(id, restrict, reqready, "destroy");
926926
if (interp == NULL) {
927927
return NULL;
928928
}
@@ -1034,20 +1034,20 @@ _interpreters.set___main___attrs
10341034
id: object
10351035
updates: object(subclass_of='&PyDict_Type')
10361036
*
1037-
restrict as restricted: bool = False
1037+
restrict: bool = False
10381038
10391039
Bind the given attributes in the interpreter's __main__ module.
10401040
[clinic start generated code]*/
10411041

10421042
static PyObject *
10431043
_interpreters_set___main___attrs_impl(PyObject *module, PyObject *id,
1044-
PyObject *updates, int restricted)
1045-
/*[clinic end generated code: output=f3803010cb452bf0 input=d16ab8d81371f86a]*/
1044+
PyObject *updates, int restrict)
1045+
/*[clinic end generated code: output=494c8fc4be971936 input=4235567e63091172]*/
10461046
{
10471047
// Look up the interpreter.
10481048
int reqready = 1;
10491049
PyInterpreterState *interp = \
1050-
resolve_interp(id, restricted, reqready, "update __main__ for");
1050+
resolve_interp(id, restrict, reqready, "update __main__ for");
10511051
if (interp == NULL) {
10521052
return NULL;
10531053
}
@@ -1109,7 +1109,7 @@ _interpreters.exec
11091109
code: object
11101110
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
11111111
*
1112-
restrict as restricted: bool = False
1112+
restrict: bool = False
11131113
11141114
Execute the provided code in the identified interpreter.
11151115
@@ -1129,13 +1129,13 @@ is ignored, including its __globals__ dict.
11291129

11301130
static PyObject *
11311131
_interpreters_exec_impl(PyObject *module, PyObject *id, PyObject *code,
1132-
PyObject *shared, int restricted)
1133-
/*[clinic end generated code: output=492057c4f10dc304 input=5a22c1ed0c5dbcf3]*/
1132+
PyObject *shared, int restrict)
1133+
/*[clinic end generated code: output=1e47a912017ea298 input=0591915eb37dc8ca]*/
11341134
{
11351135
PyThreadState *tstate = _PyThreadState_GET();
11361136
int reqready = 1;
11371137
PyInterpreterState *interp = \
1138-
resolve_interp(id, restricted, reqready, "exec code for");
1138+
resolve_interp(id, restrict, reqready, "exec code for");
11391139
if (interp == NULL) {
11401140
return NULL;
11411141
}
@@ -1165,7 +1165,7 @@ _interpreters.run_string
11651165
script: unicode
11661166
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
11671167
*
1168-
restrict as restricted: bool = False
1168+
restrict: bool = False
11691169
11701170
Execute the provided string in the identified interpreter.
11711171
@@ -1175,14 +1175,14 @@ Execute the provided string in the identified interpreter.
11751175
static PyObject *
11761176
_interpreters_run_string_impl(PyObject *module, PyObject *id,
11771177
PyObject *script, PyObject *shared,
1178-
int restricted)
1179-
/*[clinic end generated code: output=a30a64fb9ad396a2 input=51ce549b9a8dbe21]*/
1178+
int restrict)
1179+
/*[clinic end generated code: output=aa0b7383aca83202 input=f6fb336564bfe090]*/
11801180
{
11811181
#define FUNCNAME MODULE_NAME_STR ".run_string"
11821182
PyThreadState *tstate = _PyThreadState_GET();
11831183
int reqready = 1;
11841184
PyInterpreterState *interp = \
1185-
resolve_interp(id, restricted, reqready, "run a string in");
1185+
resolve_interp(id, restrict, reqready, "run a string in");
11861186
if (interp == NULL) {
11871187
return NULL;
11881188
}
@@ -1216,7 +1216,7 @@ _interpreters.run_func
12161216
func: object
12171217
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
12181218
*
1219-
restrict as restricted: bool = False
1219+
restrict: bool = False
12201220
12211221
Execute the body of the provided function in the identified interpreter.
12221222
@@ -1228,14 +1228,14 @@ are not supported. Methods and other callables are not supported either.
12281228

12291229
static PyObject *
12301230
_interpreters_run_func_impl(PyObject *module, PyObject *id, PyObject *func,
1231-
PyObject *shared, int restricted)
1232-
/*[clinic end generated code: output=131f7202ca4a0c5e input=2d62bb9b9eaf4948]*/
1231+
PyObject *shared, int restrict)
1232+
/*[clinic end generated code: output=80c7ab83886e5497 input=08d2724bce5e5d8c]*/
12331233
{
12341234
#define FUNCNAME MODULE_NAME_STR ".run_func"
12351235
PyThreadState *tstate = _PyThreadState_GET();
12361236
int reqready = 1;
12371237
PyInterpreterState *interp = \
1238-
resolve_interp(id, restricted, reqready, "run a function in");
1238+
resolve_interp(id, restrict, reqready, "run a function in");
12391239
if (interp == NULL) {
12401240
return NULL;
12411241
}
@@ -1280,7 +1280,7 @@ _interpreters.call
12801280
kwargs as kwargs_obj: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
12811281
*
12821282
preserve_exc: bool = False
1283-
restrict as restricted: bool = False
1283+
restrict: bool = False
12841284
12851285
Call the provided object in the identified interpreter.
12861286
@@ -1290,13 +1290,13 @@ Pass the given args and kwargs, if possible.
12901290
static PyObject *
12911291
_interpreters_call_impl(PyObject *module, PyObject *id, PyObject *callable,
12921292
PyObject *args_obj, PyObject *kwargs_obj,
1293-
int preserve_exc, int restricted)
1294-
/*[clinic end generated code: output=983ee27b3c43f6ef input=77590fdb3f519d65]*/
1293+
int preserve_exc, int restrict)
1294+
/*[clinic end generated code: output=d0de009172792592 input=b2b9f147c08b35fa]*/
12951295
{
12961296
PyThreadState *tstate = _PyThreadState_GET();
12971297
int reqready = 1;
12981298
PyInterpreterState *interp = \
1299-
resolve_interp(id, restricted, reqready, "make a call in");
1299+
resolve_interp(id, restrict, reqready, "make a call in");
13001300
if (interp == NULL) {
13011301
return NULL;
13021302
}
@@ -1351,18 +1351,18 @@ _interpreters_is_shareable_impl(PyObject *module, PyObject *obj)
13511351
_interpreters.is_running
13521352
id: object
13531353
*
1354-
restrict as restricted: bool = False
1354+
restrict: bool = False
13551355
13561356
Return whether or not the identified interpreter is running.
13571357
[clinic start generated code]*/
13581358

13591359
static PyObject *
1360-
_interpreters_is_running_impl(PyObject *module, PyObject *id, int restricted)
1361-
/*[clinic end generated code: output=32a6225d5ded9bdb input=3291578d04231125]*/
1360+
_interpreters_is_running_impl(PyObject *module, PyObject *id, int restrict)
1361+
/*[clinic end generated code: output=807f93da48f682cd input=ab3e5e07a870d506]*/
13621362
{
13631363
int reqready = 1;
13641364
PyInterpreterState *interp = \
1365-
resolve_interp(id, restricted, reqready, "check if running for");
1365+
resolve_interp(id, restrict, reqready, "check if running for");
13661366
if (interp == NULL) {
13671367
return NULL;
13681368
}
@@ -1378,23 +1378,23 @@ _interpreters_is_running_impl(PyObject *module, PyObject *id, int restricted)
13781378
_interpreters.get_config
13791379
id as idobj: object
13801380
*
1381-
restrict as restricted: bool = False
1381+
restrict: bool = False
13821382
13831383
Return a representation of the config used to initialize the interpreter.
13841384
[clinic start generated code]*/
13851385

13861386
static PyObject *
13871387
_interpreters_get_config_impl(PyObject *module, PyObject *idobj,
1388-
int restricted)
1389-
/*[clinic end generated code: output=63f81d35c2fe1387 input=aa38d50f534eb3c5]*/
1388+
int restrict)
1389+
/*[clinic end generated code: output=eb69d3a5cafb6b17 input=57c06ac75061acf0]*/
13901390
{
13911391
if (idobj == Py_None) {
13921392
idobj = NULL;
13931393
}
13941394

13951395
int reqready = 0;
13961396
PyInterpreterState *interp = \
1397-
resolve_interp(idobj, restricted, reqready, "get the config of");
1397+
resolve_interp(idobj, restrict, reqready, "get the config of");
13981398
if (interp == NULL) {
13991399
return NULL;
14001400
}
@@ -1440,18 +1440,18 @@ _interpreters.incref
14401440
id: object
14411441
*
14421442
implieslink: bool = False
1443-
restrict as restricted: bool = False
1443+
restrict: bool = False
14441444
14451445
[clinic start generated code]*/
14461446

14471447
static PyObject *
14481448
_interpreters_incref_impl(PyObject *module, PyObject *id, int implieslink,
1449-
int restricted)
1450-
/*[clinic end generated code: output=eccaa4e03fbe8ee2 input=a0a614748f2e348c]*/
1449+
int restrict)
1450+
/*[clinic end generated code: output=07ac7d417e19ea14 input=d83785796c100d14]*/
14511451
{
14521452
int reqready = 1;
14531453
PyInterpreterState *interp = \
1454-
resolve_interp(id, restricted, reqready, "incref");
1454+
resolve_interp(id, restrict, reqready, "incref");
14551455
if (interp == NULL) {
14561456
return NULL;
14571457
}
@@ -1470,17 +1470,17 @@ _interpreters_incref_impl(PyObject *module, PyObject *id, int implieslink,
14701470
_interpreters.decref
14711471
id: object
14721472
*
1473-
restrict as restricted: bool = False
1473+
restrict: bool = False
14741474
14751475
[clinic start generated code]*/
14761476

14771477
static PyObject *
1478-
_interpreters_decref_impl(PyObject *module, PyObject *id, int restricted)
1479-
/*[clinic end generated code: output=5c54db4b22086171 input=c4aa34f09c44e62a]*/
1478+
_interpreters_decref_impl(PyObject *module, PyObject *id, int restrict)
1479+
/*[clinic end generated code: output=1b9b5a4b9f16b914 input=3eb5e65dffddffe3]*/
14801480
{
14811481
int reqready = 1;
14821482
PyInterpreterState *interp = \
1483-
resolve_interp(id, restricted, reqready, "decref");
1483+
resolve_interp(id, restrict, reqready, "decref");
14841484
if (interp == NULL) {
14851485
return NULL;
14861486
}

0 commit comments

Comments
 (0)