/* 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;
}
result = PyObject_Format(value, fmt_spec);
Py_DECREF(value);
Py_XDECREF(fmt_spec);
- if (!result)
+ if (result == NULL) {
goto error;
+ }
}
PUSH(result);