static void qobject_input_type_uint64(Visitor *v, const char *name,

                                      uint64_t *obj, Error **errp)

{

    /* FIXME: qobject_to_qint mishandles values over INT64_MAX */

    QObjectInputVisitor *qiv = to_qiv(v);

    QObject *qobj = qobject_input_get_object(qiv, name, true, errp);

    QInt *qint;



    if (!qobj) {

        return;

    }

    qint = qobject_to_qint(qobj);

    if (!qint) {

        error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",

                   "integer");

        return;

    }



    *obj = qint_get_int(qint);

}
