mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Switch to more idiomatic C code.
This commit is contained in:
parent
135d5f49f6
commit
eb588a1d10
1 changed files with 4 additions and 3 deletions
|
@ -3399,10 +3399,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
/* If there's a conversion function, call it and replace
|
||||
value with that result. Otherwise, just use value,
|
||||
without conversion. */
|
||||
if (conv_fn) {
|
||||
if (conv_fn != NULL) {
|
||||
result = conv_fn(value);
|
||||
Py_DECREF(value);
|
||||
if (!result) {
|
||||
if (result == NULL) {
|
||||
Py_XDECREF(fmt_spec);
|
||||
goto error;
|
||||
}
|
||||
|
@ -3422,8 +3422,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
result = PyObject_Format(value, fmt_spec);
|
||||
Py_DECREF(value);
|
||||
Py_XDECREF(fmt_spec);
|
||||
if (!result)
|
||||
if (result == NULL) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
PUSH(result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue