/* Copyright (c) 2015-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "stats.h"
struct stats_item {
struct stats_vfuncs v;
};
static unsigned int stats_total_size = 0;
{
if (stats_allocated)
i_panic("stats_register() called after stats_alloc_size() was already called - this will break existing allocations");
if (!array_is_created(&stats_items))
return item;
}
{
return TRUE;
}
}
return FALSE;
}
{
return *itemp;
}
return NULL;
}
{
unsigned int idx;
i_unreached();
if (array_count(&stats_items) == 0) {
/* all stats should have been freed by now. allow
re-registering and using stats. */
}
}
{
}
{
return stats_total_size;
}
{
}
unsigned int stats_field_count(void)
{
unsigned int count = 0;
return count;
}
const char *stats_field_name(unsigned int n)
{
unsigned int i = 0, count;
if (i + count > n)
return (*itemp)->v.field_name(n - i);
i += count;
}
i_unreached();
}
unsigned int n)
{
unsigned int i = 0, count;
if (i + count > n) {
const void *item_stats
return;
}
i += count;
}
i_unreached();
}
{
error_r))
}
return ret;
}
{
}
}
{
return TRUE;
}
return FALSE;
}
{
}
}
const char **error_r)
{
const unsigned char *p;
while (size > 0) {
if (p == NULL) {
*error_r = "Expected name, but NUL is missing";
return FALSE;
}
return FALSE;
}
data = p+1;
return FALSE;
}
return TRUE;
}
{
}
{
}