/* Auto-generated by genfincode_stat.sh - DO NOT EDIT! */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include "rtpp_types.h"
#include "rtpp_debug.h"
#include "rtpp_stats.h"
#include "rtpp_stats_fin.h"
static void rtpp_stats_getidxbyname_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::getidxbyname (rtpp_stats_getidxbyname) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_getlvalbyname_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::getlvalbyname (rtpp_stats_getlvalbyname) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_getnstats_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::getnstats (rtpp_stats_getnstats) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_nstr_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::nstr (rtpp_stats_nstr) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_update_derived_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::update_derived (rtpp_stats_update_derived) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_updatebyidx_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::updatebyidx (rtpp_stats_updatebyidx) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_updatebyname_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::updatebyname (rtpp_stats_updatebyname) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static void rtpp_stats_updatebyname_d_fin(void *pub) {
    fprintf(stderr, "Method rtpp_stats@%p::updatebyname_d (rtpp_stats_updatebyname_d) is invoked after destruction\x0a", pub);
    RTPP_AUTOTRAP();
}
static const struct rtpp_stats_smethods rtpp_stats_smethods_fin = {
    .getidxbyname = (rtpp_stats_getidxbyname_t)&rtpp_stats_getidxbyname_fin,
    .getlvalbyname = (rtpp_stats_getlvalbyname_t)&rtpp_stats_getlvalbyname_fin,
    .getnstats = (rtpp_stats_getnstats_t)&rtpp_stats_getnstats_fin,
    .nstr = (rtpp_stats_nstr_t)&rtpp_stats_nstr_fin,
    .update_derived = (rtpp_stats_update_derived_t)&rtpp_stats_update_derived_fin,
    .updatebyidx = (rtpp_stats_updatebyidx_t)&rtpp_stats_updatebyidx_fin,
    .updatebyname = (rtpp_stats_updatebyname_t)&rtpp_stats_updatebyname_fin,
    .updatebyname_d = (rtpp_stats_updatebyname_d_t)&rtpp_stats_updatebyname_d_fin,
};
void rtpp_stats_fin(struct rtpp_stats *pub) {
    RTPP_DBG_ASSERT(pub->smethods->getidxbyname != (rtpp_stats_getidxbyname_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->getlvalbyname != (rtpp_stats_getlvalbyname_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->getnstats != (rtpp_stats_getnstats_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->nstr != (rtpp_stats_nstr_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->update_derived != (rtpp_stats_update_derived_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->updatebyidx != (rtpp_stats_updatebyidx_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->updatebyname != (rtpp_stats_updatebyname_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods->updatebyname_d != (rtpp_stats_updatebyname_d_t)NULL);
    RTPP_DBG_ASSERT(pub->smethods != &rtpp_stats_smethods_fin &&
      pub->smethods != NULL);
    pub->smethods = &rtpp_stats_smethods_fin;
}
#if defined(RTPP_FINTEST)
#include <assert.h>
#include <stddef.h>
#include "rtpp_mallocs.h"
#include "rtpp_refcnt.h"
#include "rtpp_linker_set.h"
#define CALL_TFIN(pub, fn) ((void (*)(typeof(pub)))((pub)->smethods->fn))(pub)

void
rtpp_stats_fintest()
{
    int naborts_s;

    struct {
        struct rtpp_stats pub;
    } *tp;

    naborts_s = _naborts;
    tp = rtpp_rzmalloc(sizeof(*tp), offsetof(typeof(*tp), pub.rcnt));
    assert(tp != NULL);
    assert(tp->pub.rcnt != NULL);
    static const struct rtpp_stats_smethods dummy = {
        .getidxbyname = (rtpp_stats_getidxbyname_t)((void *)0x1),
        .getlvalbyname = (rtpp_stats_getlvalbyname_t)((void *)0x1),
        .getnstats = (rtpp_stats_getnstats_t)((void *)0x1),
        .nstr = (rtpp_stats_nstr_t)((void *)0x1),
        .update_derived = (rtpp_stats_update_derived_t)((void *)0x1),
        .updatebyidx = (rtpp_stats_updatebyidx_t)((void *)0x1),
        .updatebyname = (rtpp_stats_updatebyname_t)((void *)0x1),
        .updatebyname_d = (rtpp_stats_updatebyname_d_t)((void *)0x1),
    };
    tp->pub.smethods = &dummy;
    CALL_SMETHOD(tp->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_stats_fin,
      &tp->pub);
    CALL_SMETHOD(tp->pub.rcnt, decref);
    CALL_TFIN(&tp->pub, getidxbyname);
    CALL_TFIN(&tp->pub, getlvalbyname);
    CALL_TFIN(&tp->pub, getnstats);
    CALL_TFIN(&tp->pub, nstr);
    CALL_TFIN(&tp->pub, update_derived);
    CALL_TFIN(&tp->pub, updatebyidx);
    CALL_TFIN(&tp->pub, updatebyname);
    CALL_TFIN(&tp->pub, updatebyname_d);
    assert((_naborts - naborts_s) == 8);
}
const static void *_rtpp_stats_ftp = (void *)&rtpp_stats_fintest;
DATA_SET(rtpp_fintests, _rtpp_stats_ftp);
#endif /* RTPP_FINTEST */
