File tree 2 files changed +3
-4
lines changed 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ static PyObject *
536
536
filter_vectorcall (PyObject * type , PyObject * const * args ,
537
537
size_t nargsf , PyObject * kwnames )
538
538
{
539
- PyTypeObject * tp = ( PyTypeObject * ) type ;
539
+ PyTypeObject * tp = _PyType_CAST ( type ) ;
540
540
if (tp == & PyFilter_Type && !_PyArg_NoKwnames ("filter" , kwnames )) {
541
541
return NULL ;
542
542
}
@@ -1251,7 +1251,7 @@ static PyObject *
1251
1251
map_vectorcall (PyObject * type , PyObject * const * args ,
1252
1252
size_t nargsf , PyObject * kwnames )
1253
1253
{
1254
- PyTypeObject * tp = ( PyTypeObject * ) type ;
1254
+ PyTypeObject * tp = _PyType_CAST ( type ) ;
1255
1255
if (tp == & PyMap_Type && !_PyArg_NoKwnames ("map" , kwnames )) {
1256
1256
return NULL ;
1257
1257
}
Original file line number Diff line number Diff line change @@ -1339,8 +1339,7 @@ specialize_class_call(
1339
1339
PyObject * callable , _Py_CODEUNIT * instr ,
1340
1340
int nargs , SpecializedCacheEntry * cache )
1341
1341
{
1342
- assert (PyType_Check (callable ));
1343
- PyTypeObject * tp = (PyTypeObject * )callable ;
1342
+ PyTypeObject * tp = _PyType_CAST (callable );
1344
1343
if (_Py_OPCODE (instr [-1 ]) == PRECALL_METHOD ) {
1345
1344
SPECIALIZATION_FAIL (CALL_NO_KW , SPEC_FAIL_METHOD_CALL_CLASS );
1346
1345
return -1 ;
You can’t perform that action at this time.
0 commit comments