X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpyvalues.c;h=12c8dde8b1bbf901794b9594b3e29b664967fb6a;hb=029b489b237a8785c539f85d4840a49ba6743603;hp=15c1848488e70ead655ea1d2d0744572b371cd2b;hpb=7c2336dde35a7b42853b6ca167d4164619e52333;p=collectd.git diff --git a/src/pyvalues.c b/src/pyvalues.c index 15c18484..12c8dde8 100644 --- a/src/pyvalues.c +++ b/src/pyvalues.c @@ -38,7 +38,7 @@ typedef struct { int (*add_signed_int)(void *, const char *, int64_t); int (*add_unsigned_int)(void *, const char *, uint64_t); int (*add_double)(void *, const char *, double); - int (*add_boolean)(void *, const char *, _Bool); + int (*add_boolean)(void *, const char *, bool); } cpy_build_meta_handler_t; #define FreeAll() \ @@ -562,7 +562,7 @@ static int cpy_build_meta_generic(PyObject *meta, CPY_BUILD_META_FUNC(meta_type, func_prefix##_add_signed_int, int64_t) \ CPY_BUILD_META_FUNC(meta_type, func_prefix##_add_unsigned_int, uint64_t) \ CPY_BUILD_META_FUNC(meta_type, func_prefix##_add_double, double) \ - CPY_BUILD_META_FUNC(meta_type, func_prefix##_add_boolean, _Bool) \ + CPY_BUILD_META_FUNC(meta_type, func_prefix##_add_boolean, bool) \ \ static cpy_build_meta_handler_t cpy_##func_prefix = { \ .add_string = cpy_##func_prefix##_add_string, \ @@ -641,7 +641,8 @@ static PyObject *Values_dispatch(Values *self, PyObject *args, PyObject *kwds) { } size = (size_t)PySequence_Length(values); if (size != ds->ds_num) { - PyErr_Format(PyExc_RuntimeError, "type %s needs %zu values, got %zu", + PyErr_Format(PyExc_RuntimeError, + "type %s needs %" PRIsz " values, got %" PRIsz, value_list.type, ds->ds_num, size); return NULL; } @@ -765,7 +766,8 @@ static PyObject *Values_write(Values *self, PyObject *args, PyObject *kwds) { } size = (size_t)PySequence_Length(values); if (size != ds->ds_num) { - PyErr_Format(PyExc_RuntimeError, "type %s needs %zu values, got %zu", + PyErr_Format(PyExc_RuntimeError, + "type %s needs %" PRIsz " values, got %" PRIsz, value_list.type, ds->ds_num, size); return NULL; }