mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
rewrite error handling to make sense
This commit is contained in:
parent
22081a1364
commit
d1e5493a26
1 changed files with 7 additions and 3 deletions
|
@ -824,14 +824,18 @@ analyze_child_block(PySTEntryObject *entry, PyObject *bound, PyObject *free,
|
|||
|
||||
if (!analyze_block(entry, temp_bound, temp_free, temp_global))
|
||||
goto error;
|
||||
success = PyNumber_InPlaceOr(child_free, temp_free) >= 0;
|
||||
if (PyNumber_InPlaceOr(child_free, temp_free) < 0)
|
||||
goto error;
|
||||
Py_DECREF(child_free);
|
||||
success = 1;
|
||||
Py_DECREF(temp_bound);
|
||||
Py_DECREF(temp_free);
|
||||
Py_DECREF(temp_global);
|
||||
return 1;
|
||||
error:
|
||||
Py_XDECREF(temp_bound);
|
||||
Py_XDECREF(temp_free);
|
||||
Py_XDECREF(temp_global);
|
||||
return success;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue