There was an error while loading. Please reload this page.
1 parent 8ee07dd commit 7835cbfCopy full SHA for 7835cbf
2 files changed
Python/bltinmodule.c
@@ -536,7 +536,7 @@ static PyObject *
536
filter_vectorcall(PyObject *type, PyObject * const*args,
537
size_t nargsf, PyObject *kwnames)
538
{
539
- PyTypeObject *tp = (PyTypeObject *)type;
+ PyTypeObject *tp = _PyType_CAST(type);
540
if (tp == &PyFilter_Type && !_PyArg_NoKwnames("filter", kwnames)) {
541
return NULL;
542
}
@@ -1251,7 +1251,7 @@ static PyObject *
1251
map_vectorcall(PyObject *type, PyObject * const*args,
1252
1253
1254
1255
if (tp == &PyMap_Type && !_PyArg_NoKwnames("map", kwnames)) {
1256
1257
Python/specialize.c
@@ -1339,8 +1339,7 @@ specialize_class_call(
1339
PyObject *callable, _Py_CODEUNIT *instr,
1340
int nargs, SpecializedCacheEntry *cache)
1341
1342
- assert(PyType_Check(callable));
1343
- PyTypeObject *tp = (PyTypeObject *)callable;
+ PyTypeObject *tp = _PyType_CAST(callable);
1344
if (_Py_OPCODE(instr[-1]) == PRECALL_METHOD) {
1345
SPECIALIZATION_FAIL(CALL_NO_KW, SPEC_FAIL_METHOD_CALL_CLASS);
1346
return -1;
0 commit comments