We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Py_NewInterpreterFromConfig
1 parent cc813e1 commit e3038e9Copy full SHA for e3038e9
Doc/c-api/init.rst
@@ -1738,7 +1738,11 @@ function. You can create and destroy them using the following functions:
1738
.check_multi_interp_extensions = 1,
1739
.gil = PyInterpreterConfig_OWN_GIL,
1740
};
1741
- PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);
+ PyThreadState *tstate = NULL;
1742
+ PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);
1743
+ if (PyStatus_Exception(status)) {
1744
+ Py_ExitStatusException(status);
1745
+ }
1746
1747
Note that the config is used only briefly and does not get modified.
1748
During initialization the config's values are converted into various
0 commit comments