filter_vectorcall(PyObject *type, PyObject * const*args,
size_t nargsf, PyObject *kwnames)
{
- PyTypeObject *tp = (PyTypeObject *)type;
+ PyTypeObject *tp = _PyType_CAST(type);
if (tp == &PyFilter_Type && !_PyArg_NoKwnames("filter", kwnames)) {
return NULL;
}
map_vectorcall(PyObject *type, PyObject * const*args,
size_t nargsf, PyObject *kwnames)
{
- PyTypeObject *tp = (PyTypeObject *)type;
+ PyTypeObject *tp = _PyType_CAST(type);
if (tp == &PyMap_Type && !_PyArg_NoKwnames("map", kwnames)) {
return NULL;
}
PyObject *callable, _Py_CODEUNIT *instr,
int nargs, SpecializedCacheEntry *cache)
{
- assert(PyType_Check(callable));
- PyTypeObject *tp = (PyTypeObject *)callable;
+ PyTypeObject *tp = _PyType_CAST(callable);
if (_Py_OPCODE(instr[-1]) == PRECALL_METHOD) {
SPECIALIZATION_FAIL(CALL_NO_KW, SPEC_FAIL_METHOD_CALL_CLASS);
return -1;