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() \
static PyObject *cpy_common_repr(PyObject *s) {
PyObject *ret, *tmp;
- static PyObject *l_type = NULL, *l_type_instance = NULL, *l_plugin = NULL,
- *l_plugin_instance = NULL;
- static PyObject *l_host = NULL, *l_time = NULL;
+ static PyObject *l_type, *l_type_instance, *l_plugin, *l_plugin_instance;
+ static PyObject *l_host, *l_time;
PluginData *self = (PluginData *)s;
if (l_type == NULL)
static PyObject *PluginData_repr(PyObject *s) {
PyObject *ret;
- static PyObject *l_closing = NULL;
+ static PyObject *l_closing;
if (l_closing == NULL)
l_closing = cpy_string_to_unicode_or_bytes(")");
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, \
}
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;
}
}
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;
}
static PyObject *Values_repr(PyObject *s) {
PyObject *ret, *tmp;
- static PyObject *l_interval = NULL, *l_values = NULL, *l_meta = NULL,
- *l_closing = NULL;
+ static PyObject *l_interval, *l_values, *l_meta, *l_closing;
Values *self = (Values *)s;
if (l_interval == NULL)
static PyObject *Notification_repr(PyObject *s) {
PyObject *ret, *tmp;
- static PyObject *l_severity = NULL, *l_message = NULL, *l_meta = NULL,
- *l_closing = NULL;
+ static PyObject *l_severity, *l_message, *l_meta, *l_closing;
Notification *self = (Notification *)s;
if (l_severity == NULL)