diff options
author | Eric V. Smith <eric@trueblade.com> | 2016-02-05 23:26:20 (GMT) |
---|---|---|
committer | Eric V. Smith <eric@trueblade.com> | 2016-02-05 23:26:20 (GMT) |
commit | eb588a1d10e94085c622eb732cfe535e0ebaec8a (patch) | |
tree | d8c79e12a31fe369a14025cda359fae746661edd | |
parent | 135d5f49f6da605bb1073f939e826e352a2d655f (diff) | |
download | cpython-eb588a1d10e94085c622eb732cfe535e0ebaec8a.zip cpython-eb588a1d10e94085c622eb732cfe535e0ebaec8a.tar.gz cpython-eb588a1d10e94085c622eb732cfe535e0ebaec8a.tar.bz2 |
Switch to more idiomatic C code.
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index b815ccd..8904d7a 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |