File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ static PyObject *
536536filter_vectorcall (PyObject * type , PyObject * const * args ,
537537 size_t nargsf , PyObject * kwnames )
538538{
539- PyTypeObject * tp = ( PyTypeObject * ) type ;
539+ PyTypeObject * tp = _PyType_CAST ( type ) ;
540540 if (tp == & PyFilter_Type && !_PyArg_NoKwnames ("filter" , kwnames )) {
541541 return NULL ;
542542 }
@@ -1251,7 +1251,7 @@ static PyObject *
12511251map_vectorcall (PyObject * type , PyObject * const * args ,
12521252 size_t nargsf , PyObject * kwnames )
12531253{
1254- PyTypeObject * tp = ( PyTypeObject * ) type ;
1254+ PyTypeObject * tp = _PyType_CAST ( type ) ;
12551255 if (tp == & PyMap_Type && !_PyArg_NoKwnames ("map" , kwnames )) {
12561256 return NULL ;
12571257 }
Original file line number Diff line number Diff line change @@ -1339,8 +1339,7 @@ specialize_class_call(
13391339 PyObject * callable , _Py_CODEUNIT * instr ,
13401340 int nargs , SpecializedCacheEntry * cache )
13411341{
1342- assert (PyType_Check (callable ));
1343- PyTypeObject * tp = (PyTypeObject * )callable ;
1342+ PyTypeObject * tp = _PyType_CAST (callable );
13441343 if (_Py_OPCODE (instr [-1 ]) == PRECALL_METHOD ) {
13451344 SPECIALIZATION_FAIL (CALL_NO_KW , SPEC_FAIL_METHOD_CALL_CLASS );
13461345 return -1 ;
You can’t perform that action at this time.
0 commit comments