File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -613,21 +613,15 @@ _ccode2pit(void *cco, uintptr_t current_tag)
613613 name = PyStr_FromString (cfn -> m_ml -> ml_name );
614614 if (name != NULL ) {
615615 obj_type = PyObject_Type (cfn -> m_self );
616- if (obj_type == NULL ) {
617- PyErr_Clear ();
618- Py_DECREF (name );
619- goto fallback_name ;
620- }
621616
622617 // use method descriptor instead of instance methods for builtin
623- // objects. Otherwise , there might be some errors since we INCREF
618+ // objects. Othwerwise , there might be some errors since we INCREF
624619 // on the bound method. See: https://github.com/sumerc/yappi/issues/60
625620 method_descriptor = PyObject_GetAttr (obj_type , name );
626621 if (method_descriptor ) {
627622 pit -> fn_descriptor = method_descriptor ;
628623 Py_INCREF (method_descriptor );
629624 }
630- PyErr_Clear ();
631625
632626 // get name from type+name
633627 mo = _PyType_Lookup ((PyTypeObject * )obj_type , name );
@@ -643,7 +637,6 @@ _ccode2pit(void *cco, uintptr_t current_tag)
643637 PyErr_Clear ();
644638 }
645639
646- fallback_name :
647640 if (pit -> fn_descriptor == NULL ) {
648641 pit -> fn_descriptor = (PyObject * )cfn ;
649642 Py_INCREF (cfn );
You can’t perform that action at this time.
0 commit comments