File tree Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Expand file tree Collapse file tree 2 files changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -2644,7 +2644,7 @@ sys__baserepl_impl(PyObject *module)
26442644/*[clinic input]
26452645sys._clear_type_descriptors
26462646
2647- type: object
2647+ type: object(subclass_of='&PyType_Type')
26482648 /
26492649
26502650Private function for clearing certain descriptors from a type's dictionary.
@@ -2653,14 +2653,10 @@ See gh-135228 for context.
26532653[clinic start generated code]*/
26542654
26552655static PyObject *
2656- sys__clear_type_descriptors (PyObject * module , PyObject * type )
2657- /*[clinic end generated code: output=7d5cefcf861909e0 input=5fdc23500d477de6 ]*/
2656+ sys__clear_type_descriptors_impl (PyObject * module , PyObject * type )
2657+ /*[clinic end generated code: output=5ad17851b762b6d9 input=dc536c97fde07251 ]*/
26582658{
2659- if (!PyType_Check (type )) {
2660- PyErr_SetString (PyExc_TypeError , "argument must be a type" );
2661- return NULL ;
2662- }
2663- PyTypeObject * typeobj = (PyTypeObject * )(type );
2659+ PyTypeObject * typeobj = (PyTypeObject * )type ;
26642660 if (_PyType_HasFeature (typeobj , Py_TPFLAGS_IMMUTABLETYPE )) {
26652661 PyErr_SetString (PyExc_TypeError , "argument is immutable" );
26662662 return NULL ;
You can’t perform that action at this time.
0 commit comments