X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpython.h;fp=src%2Fcpython.h;h=880fa4ce29adb8333e1c0576480dfa292affe0da;hb=8361c1e963f9184c3c4d87197fd6996d667cdb3f;hp=81e580d485c9bd58c625df40b369edd75dd94e75;hpb=f14bb45d570e0b34bdd3a2a0cadfe414c3dfda40;p=collectd.git diff --git a/src/cpython.h b/src/cpython.h index 81e580d4..880fa4ce 100644 --- a/src/cpython.h +++ b/src/cpython.h @@ -21,7 +21,7 @@ * DEALINGS IN THE SOFTWARE. * * Authors: - * Sven Trenkel + * Sven Trenkel **/ /* Some python versions don't include this by default. */ @@ -111,10 +111,10 @@ } while (0) static inline void CPY_STRCAT(PyObject **a, PyObject *b) { PyObject *ret; - + if (!a || !*a) return; - + ret = PyUnicode_Concat(*a, b); Py_DECREF(*a); *a = ret; @@ -156,7 +156,7 @@ static inline PyObject *cpy_string_to_unicode_or_bytes(const char *buf) { return PyBytes_FromString(buf); #else return PyString_FromString(buf); -#endif +#endif } void cpy_log_exception(const char *context);