Commit eb588a1d authored by Eric V. Smith's avatar Eric V. Smith

Switch to more idiomatic C code.

parent 135d5f49
...@@ -3399,10 +3399,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) ...@@ -3399,10 +3399,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
/* If there's a conversion function, call it and replace /* If there's a conversion function, call it and replace
value with that result. Otherwise, just use value, value with that result. Otherwise, just use value,
without conversion. */ without conversion. */
if (conv_fn) { if (conv_fn != NULL) {
result = conv_fn(value); result = conv_fn(value);
Py_DECREF(value); Py_DECREF(value);
if (!result) { if (result == NULL) {
Py_XDECREF(fmt_spec); Py_XDECREF(fmt_spec);
goto error; goto error;
} }
...@@ -3422,9 +3422,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) ...@@ -3422,9 +3422,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
result = PyObject_Format(value, fmt_spec); result = PyObject_Format(value, fmt_spec);
Py_DECREF(value); Py_DECREF(value);
Py_XDECREF(fmt_spec); Py_XDECREF(fmt_spec);
if (!result) if (result == NULL) {
goto error; goto error;
} }
}
PUSH(result); PUSH(result);
DISPATCH(); DISPATCH();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment