Skip to content

Commit 5486224

Browse files
committed
test: ci
1 parent 8b09e4a commit 5486224

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

yappi/_yappi.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)