void qmp_object_add(const char *type, const char *id,

                    bool has_props, QObject *props, Error **errp)

{

    const QDict *pdict = NULL;

    QmpInputVisitor *qiv;

    Object *obj;



    if (props) {

        pdict = qobject_to_qdict(props);

        if (!pdict) {

            error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict");

            return;

        }

    }



    qiv = qmp_input_visitor_new(props, false);

    obj = user_creatable_add_type(type, id, pdict,

                                  qmp_input_get_visitor(qiv), errp);

    qmp_input_visitor_cleanup(qiv);

    if (obj) {

        object_unref(obj);

    }

}

void qmp_object_add(const char *type, const char *id,

                    bool has_props, QObject *props, Error **errp)

{

    const QDict *pdict = NULL;

    QmpInputVisitor *qiv;

    Object *obj;



    if (props) {

        pdict = qobject_to_qdict(props);

        if (!pdict) {

            error_setg(errp, QERR_INVALID_PARAMETER_TYPE, "props", "dict");

            return;

        }

    }



    qiv = qmp_input_visitor_new(props, false);

    obj = user_creatable_add_type(type, id, pdict,

                                  qmp_input_get_visitor(qiv), errp);

    qmp_input_visitor_cleanup(qiv);

    if (obj) {

        object_unref(obj);

    }

}

void FUNC_0(const char *VAR_0, const char *VAR_1,

                    bool VAR_2, QObject *VAR_3, Error **VAR_4)

{

    const QDict *VAR_5 = NULL;

    QmpInputVisitor *qiv;

    Object *obj;



    if (VAR_3) {

        VAR_5 = qobject_to_qdict(VAR_3);

        if (!VAR_5) {

            error_setg(VAR_4, QERR_INVALID_PARAMETER_TYPE, "VAR_3", "dict");

            return;

        }

    }



    qiv = qmp_input_visitor_new(VAR_3, false);

    obj = user_creatable_add_type(VAR_0, VAR_1, VAR_5,

                                  qmp_input_get_visitor(qiv), VAR_4);

    qmp_input_visitor_cleanup(qiv);

    if (obj) {

        object_unref(obj);

    }

}

void FUNC_0(const char *VAR_0, const char *VAR_1,
bool VAR_2, QObject *VAR_3, Error **VAR_4)
{ const QDict *VAR_5 = NULL; QmpInputVisitor *qiv; Object *obj; if (VAR_3) { VAR_5 = qobject_to_qdict(VAR_3); if (!VAR_5) { error_setg(VAR_4, QERR_INVALID_PARAMETER_TYPE, "VAR_3", "dict"); return; } } qiv = qmp_input_visitor_new(VAR_3, false); obj = user_creatable_add_type(VAR_0, VAR_1, VAR_5,
qmp_input_get_visitor(qiv), VAR_4); qmp_input_visitor_cleanup(qiv); if (obj) { object_unref(obj); } }