Skip to content

Commit eb21bb1

Browse files
committed
Indicate positional-only parameters
1 parent 9e5577e commit eb21bb1

File tree

2 files changed

+92
-211
lines changed

2 files changed

+92
-211
lines changed

Modules/_interpretersmodule.c

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ overriding the initial values.");
851851
/*[clinic input]
852852
_interpreters.create
853853
config as configobj: object(py_default="'isolated'") = NULL
854+
/
854855
*
855856
reqrefs: bool = False
856857
@@ -868,7 +869,7 @@ is "isolated".
868869

869870
static PyObject *
870871
_interpreters_create_impl(PyObject *module, PyObject *configobj, int reqrefs)
871-
/*[clinic end generated code: output=c1cc6835b1277c16 input=c6d69e3ff2315a65]*/
872+
/*[clinic end generated code: output=c1cc6835b1277c16 input=9b240f749f0f0972]*/
872873
{
873874
PyInterpreterConfig config;
874875
if (config_from_object(configobj, &config) < 0) {
@@ -906,6 +907,7 @@ _interpreters_create_impl(PyObject *module, PyObject *configobj, int reqrefs)
906907
/*[clinic input]
907908
_interpreters.destroy
908909
id: object
910+
/
909911
*
910912
restrict as restricted: bool = False
911913
@@ -917,7 +919,7 @@ So does an unrecognized ID.
917919

918920
static PyObject *
919921
_interpreters_destroy_impl(PyObject *module, PyObject *id, int restricted)
920-
/*[clinic end generated code: output=0bc20da8700ab4dd input=561bdd6537639d40]*/
922+
/*[clinic end generated code: output=0bc20da8700ab4dd input=d2cfa1ef3b4a4ea5]*/
921923
{
922924
// Look up the interpreter.
923925
int reqready = 0;
@@ -1032,7 +1034,8 @@ _interpreters_get_main_impl(PyObject *module)
10321034
/*[clinic input]
10331035
_interpreters.set___main___attrs
10341036
id: object
1035-
updates: object(subclass_of='&PyDict_Type')
1037+
ns as updates: object(subclass_of='&PyDict_Type')
1038+
/
10361039
*
10371040
restrict as restricted: bool = False
10381041
@@ -1042,7 +1045,7 @@ Bind the given attributes in the interpreter's __main__ module.
10421045
static PyObject *
10431046
_interpreters_set___main___attrs_impl(PyObject *module, PyObject *id,
10441047
PyObject *updates, int restricted)
1045-
/*[clinic end generated code: output=f3803010cb452bf0 input=d16ab8d81371f86a]*/
1048+
/*[clinic end generated code: output=f3803010cb452bf0 input=69d409c4dd04dab9]*/
10461049
{
10471050
// Look up the interpreter.
10481051
int reqready = 1;
@@ -1106,6 +1109,7 @@ _handle_script_error(struct run_result *runres)
11061109
/*[clinic input]
11071110
_interpreters.exec
11081111
id: object
1112+
/
11091113
code: object
11101114
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
11111115
*
@@ -1130,7 +1134,7 @@ is ignored, including its __globals__ dict.
11301134
static PyObject *
11311135
_interpreters_exec_impl(PyObject *module, PyObject *id, PyObject *code,
11321136
PyObject *shared, int restricted)
1133-
/*[clinic end generated code: output=492057c4f10dc304 input=5a22c1ed0c5dbcf3]*/
1137+
/*[clinic end generated code: output=492057c4f10dc304 input=687f3f6ac5294593]*/
11341138
{
11351139
PyThreadState *tstate = _PyThreadState_GET();
11361140
int reqready = 1;
@@ -1162,6 +1166,7 @@ _interpreters_exec_impl(PyObject *module, PyObject *id, PyObject *code,
11621166
/*[clinic input]
11631167
_interpreters.run_string
11641168
id: object
1169+
/
11651170
script: unicode
11661171
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
11671172
*
@@ -1213,6 +1218,7 @@ _interpreters_run_string_impl(PyObject *module, PyObject *id,
12131218
/*[clinic input]
12141219
_interpreters.run_func
12151220
id: object
1221+
/
12161222
func: object
12171223
shared: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
12181224
*
@@ -1229,7 +1235,7 @@ are not supported. Methods and other callables are not supported either.
12291235
static PyObject *
12301236
_interpreters_run_func_impl(PyObject *module, PyObject *id, PyObject *func,
12311237
PyObject *shared, int restricted)
1232-
/*[clinic end generated code: output=131f7202ca4a0c5e input=2d62bb9b9eaf4948]*/
1238+
/*[clinic end generated code: output=131f7202ca4a0c5e input=aa2dbab6f7354cd6]*/
12331239
{
12341240
#define FUNCNAME MODULE_NAME_STR ".run_func"
12351241
PyThreadState *tstate = _PyThreadState_GET();
@@ -1275,6 +1281,7 @@ _interpreters_run_func_impl(PyObject *module, PyObject *id, PyObject *func,
12751281
/*[clinic input]
12761282
_interpreters.call
12771283
id: object
1284+
/
12781285
callable: object
12791286
args as args_obj: object(subclass_of='&PyTuple_Type', c_default='NULL') = ()
12801287
kwargs as kwargs_obj: object(subclass_of='&PyDict_Type', c_default='NULL') = {}
@@ -1291,7 +1298,7 @@ static PyObject *
12911298
_interpreters_call_impl(PyObject *module, PyObject *id, PyObject *callable,
12921299
PyObject *args_obj, PyObject *kwargs_obj,
12931300
int preserve_exc, int restricted)
1294-
/*[clinic end generated code: output=983ee27b3c43f6ef input=77590fdb3f519d65]*/
1301+
/*[clinic end generated code: output=983ee27b3c43f6ef input=826c8dab4b1059b4]*/
12951302
{
12961303
PyThreadState *tstate = _PyThreadState_GET();
12971304
int reqready = 1;
@@ -1330,13 +1337,14 @@ _interpreters_call_impl(PyObject *module, PyObject *id, PyObject *callable,
13301337
/*[clinic input]
13311338
_interpreters.is_shareable
13321339
obj: object
1340+
/
13331341
13341342
Return True if the object's data may be shared between interpreters and False otherwise.
13351343
[clinic start generated code]*/
13361344

13371345
static PyObject *
1338-
_interpreters_is_shareable_impl(PyObject *module, PyObject *obj)
1339-
/*[clinic end generated code: output=227856926a22940b input=72b9a36bdf1d2a53]*/
1346+
_interpreters_is_shareable(PyObject *module, PyObject *obj)
1347+
/*[clinic end generated code: output=f2169d4c1f5d7bca input=4239989a8634b292]*/
13401348
{
13411349
PyThreadState *tstate = _PyThreadState_GET();
13421350
if (_PyObject_CheckXIData(tstate, obj) == 0) {
@@ -1350,6 +1358,7 @@ _interpreters_is_shareable_impl(PyObject *module, PyObject *obj)
13501358
/*[clinic input]
13511359
_interpreters.is_running
13521360
id: object
1361+
/
13531362
*
13541363
restrict as restricted: bool = False
13551364
@@ -1358,7 +1367,7 @@ Return whether or not the identified interpreter is running.
13581367

13591368
static PyObject *
13601369
_interpreters_is_running_impl(PyObject *module, PyObject *id, int restricted)
1361-
/*[clinic end generated code: output=32a6225d5ded9bdb input=3291578d04231125]*/
1370+
/*[clinic end generated code: output=32a6225d5ded9bdb input=a4d98a82fcb4bf6e]*/
13621371
{
13631372
int reqready = 1;
13641373
PyInterpreterState *interp = \
@@ -1377,6 +1386,7 @@ _interpreters_is_running_impl(PyObject *module, PyObject *id, int restricted)
13771386
/*[clinic input]
13781387
_interpreters.get_config
13791388
id as idobj: object
1389+
/
13801390
*
13811391
restrict as restricted: bool = False
13821392
@@ -1386,7 +1396,7 @@ Return a representation of the config used to initialize the interpreter.
13861396
static PyObject *
13871397
_interpreters_get_config_impl(PyObject *module, PyObject *idobj,
13881398
int restricted)
1389-
/*[clinic end generated code: output=63f81d35c2fe1387 input=aa38d50f534eb3c5]*/
1399+
/*[clinic end generated code: output=63f81d35c2fe1387 input=79d88cf77a8ba034]*/
13901400
{
13911401
if (idobj == Py_None) {
13921402
idobj = NULL;
@@ -1417,13 +1427,14 @@ _interpreters_get_config_impl(PyObject *module, PyObject *idobj,
14171427
/*[clinic input]
14181428
_interpreters.whence
14191429
id: object
1430+
/
14201431
14211432
Return an identifier for where the interpreter was created.
14221433
[clinic start generated code]*/
14231434

14241435
static PyObject *
1425-
_interpreters_whence_impl(PyObject *module, PyObject *id)
1426-
/*[clinic end generated code: output=ef2c21ab106c2c20 input=eeede0a2fbfa2968]*/
1436+
_interpreters_whence(PyObject *module, PyObject *id)
1437+
/*[clinic end generated code: output=e558d207672470cf input=6148f02c882e39f6]*/
14271438
{
14281439
PyInterpreterState *interp = look_up_interp(id);
14291440
if (interp == NULL) {
@@ -1438,6 +1449,7 @@ _interpreters_whence_impl(PyObject *module, PyObject *id)
14381449
/*[clinic input]
14391450
_interpreters.incref
14401451
id: object
1452+
/
14411453
*
14421454
implieslink: bool = False
14431455
restrict as restricted: bool = False
@@ -1447,7 +1459,7 @@ _interpreters.incref
14471459
static PyObject *
14481460
_interpreters_incref_impl(PyObject *module, PyObject *id, int implieslink,
14491461
int restricted)
1450-
/*[clinic end generated code: output=eccaa4e03fbe8ee2 input=a0a614748f2e348c]*/
1462+
/*[clinic end generated code: output=eccaa4e03fbe8ee2 input=a49374f447dead6f]*/
14511463
{
14521464
int reqready = 1;
14531465
PyInterpreterState *interp = \
@@ -1469,14 +1481,15 @@ _interpreters_incref_impl(PyObject *module, PyObject *id, int implieslink,
14691481
/*[clinic input]
14701482
_interpreters.decref
14711483
id: object
1484+
/
14721485
*
14731486
restrict as restricted: bool = False
14741487
14751488
[clinic start generated code]*/
14761489

14771490
static PyObject *
14781491
_interpreters_decref_impl(PyObject *module, PyObject *id, int restricted)
1479-
/*[clinic end generated code: output=5c54db4b22086171 input=c4aa34f09c44e62a]*/
1492+
/*[clinic end generated code: output=5c54db4b22086171 input=6f82beeae0b1c2b1]*/
14801493
{
14811494
int reqready = 1;
14821495
PyInterpreterState *interp = \
@@ -1494,6 +1507,7 @@ _interpreters_decref_impl(PyObject *module, PyObject *id, int restricted)
14941507
/*[clinic input]
14951508
_interpreters.capture_exception
14961509
exc_arg: object(c_default='NULL') = None
1510+
/
14971511
14981512
Return a snapshot of an exception.
14991513
@@ -1503,7 +1517,7 @@ The returned snapshot is the same as what _interpreters.exec() returns.
15031517

15041518
static PyObject *
15051519
_interpreters_capture_exception_impl(PyObject *module, PyObject *exc_arg)
1506-
/*[clinic end generated code: output=ef3f5393ef9c88a6 input=e607efac7eb95fba]*/
1520+
/*[clinic end generated code: output=ef3f5393ef9c88a6 input=e67d59d7fbb6d58c]*/
15071521
{
15081522
PyObject *exc = exc_arg;
15091523
if (exc == NULL || exc == Py_None) {

0 commit comments

Comments
 (0)