mirror of
https://github.com/python/cpython.git
synced 2025-10-07 07:31:46 +00:00
gh-125716: Raise an Exception If _globals_init() Fails In the _interpqueues Module (gh-125802)
The fix applies to the _interpchannels module as well. I've also included a drive-by typo fix for _interpqueues.
This commit is contained in:
parent
9dde4638e4
commit
44f841f01a
2 changed files with 5 additions and 3 deletions
|
@ -3482,7 +3482,8 @@ The 'interpreters' module provides a more convenient interface.");
|
||||||
static int
|
static int
|
||||||
module_exec(PyObject *mod)
|
module_exec(PyObject *mod)
|
||||||
{
|
{
|
||||||
if (_globals_init() != 0) {
|
int err = _globals_init();
|
||||||
|
if (handle_channel_error(err, mod, -1)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1312,7 +1312,7 @@ _queueid_xid_new(int64_t qid)
|
||||||
|
|
||||||
struct _queueid_xid *data = PyMem_RawMalloc(sizeof(struct _queueid_xid));
|
struct _queueid_xid *data = PyMem_RawMalloc(sizeof(struct _queueid_xid));
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
_queues_incref(queues, qid);
|
_queues_decref(queues, qid);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
data->qid = qid;
|
data->qid = qid;
|
||||||
|
@ -1894,7 +1894,8 @@ The 'interpreters' module provides a more convenient interface.");
|
||||||
static int
|
static int
|
||||||
module_exec(PyObject *mod)
|
module_exec(PyObject *mod)
|
||||||
{
|
{
|
||||||
if (_globals_init() != 0) {
|
int err = _globals_init();
|
||||||
|
if (handle_queue_error(err, mod, -1)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue