Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Modules/_xxsubinterpretersmodule.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -2583,7 +2583,7 @@ channel_create(PyObject *self, PyObject *Py_UNUSED(ignored))
{
int64_t cid = _channel_create(&_globals.channels);
if (cid < 0) {
(void)handle_channel_error(cid, self, -1);
(void)handle_channel_error(-1, self, cid);
return NULL;
}
module_state *state = get_module_state(self);
Expand DownExpand Up@@ -2985,6 +2985,11 @@ module_exec(PyObject *mod)
return -1;
}

module_state *state = get_module_state(mod);
if (state == NULL) {
goto error;
}

/* Add exception types */
if (interp_exceptions_init(mod) != 0) {
goto error;
Expand All@@ -2994,7 +2999,6 @@ module_exec(PyObject *mod)
}

/* Add other types */
module_state *state = get_module_state(mod);

// ChannelID
state->ChannelIDType = add_new_type(
Expand Down