Skip to content

Commit

Permalink
pythongh-110266: Fix "get_module_from_owned_type is unused" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Oct 3, 2023
1 parent 8c07137 commit 0e3e0f5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Modules/_xxinterpchannelsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ _get_current_module(void)
return mod;
}

static PyObject *
get_module_from_owned_type(PyTypeObject *cls)
{
assert(cls != NULL);
return _get_current_module();
// XXX Use the more efficient API now that we use heap types:
//return PyType_GetModule(cls);
}

static struct PyModuleDef moduledef;

static PyObject *
Expand Down Expand Up @@ -2464,7 +2455,8 @@ channel__channel_id(PyObject *self, PyObject *args, PyObject *kwds)
return NULL;
}
PyTypeObject *cls = state->ChannelIDType;
assert(get_module_from_owned_type(cls) == self);
assert(cls != NULL);
assert(_get_current_module() == self);

return _channelid_new(self, cls, args, kwds);
}
Expand Down

0 comments on commit 0e3e0f5

Please sign in to comment.