void object_property_add(Object *obj, const char *name, const char *type,

                         ObjectPropertyAccessor *get,

                         ObjectPropertyAccessor *set,

                         ObjectPropertyRelease *release,

                         void *opaque, Error **errp)

{

    ObjectProperty *prop;



    QTAILQ_FOREACH(prop, &obj->properties, node) {

        if (strcmp(prop->name, name) == 0) {

            error_setg(errp, "attempt to add duplicate property '%s'"

                       " to object (type '%s')", name,

                       object_get_typename(obj));

            return;

        }

    }



    prop = g_malloc0(sizeof(*prop));



    prop->name = g_strdup(name);

    prop->type = g_strdup(type);



    prop->get = get;

    prop->set = set;

    prop->release = release;

    prop->opaque = opaque;



    QTAILQ_INSERT_TAIL(&obj->properties, prop, node);

}

void object_property_add(Object *obj, const char *name, const char *type,

                         ObjectPropertyAccessor *get,

                         ObjectPropertyAccessor *set,

                         ObjectPropertyRelease *release,

                         void *opaque, Error **errp)

{

    ObjectProperty *prop;



    QTAILQ_FOREACH(prop, &obj->properties, node) {

        if (strcmp(prop->name, name) == 0) {

            error_setg(errp, "attempt to add duplicate property '%s'"

                       " to object (type '%s')", name,

                       object_get_typename(obj));

            return;

        }

    }



    prop = g_malloc0(sizeof(*prop));



    prop->name = g_strdup(name);

    prop->type = g_strdup(type);



    prop->get = get;

    prop->set = set;

    prop->release = release;

    prop->opaque = opaque;



    QTAILQ_INSERT_TAIL(&obj->properties, prop, node);

}

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

                         ObjectPropertyAccessor *VAR_3,

                         ObjectPropertyAccessor *VAR_4,

                         ObjectPropertyRelease *VAR_5,

                         void *VAR_6, Error **VAR_7)

{

    ObjectProperty *prop;



    QTAILQ_FOREACH(prop, &VAR_0->properties, node) {

        if (strcmp(prop->VAR_1, VAR_1) == 0) {

            error_setg(VAR_7, "attempt to add duplicate property '%s'"

                       " to object (VAR_2 '%s')", VAR_1,

                       object_get_typename(VAR_0));

            return;

        }

    }



    prop = g_malloc0(sizeof(*prop));



    prop->VAR_1 = g_strdup(VAR_1);

    prop->VAR_2 = g_strdup(VAR_2);



    prop->VAR_3 = VAR_3;

    prop->VAR_4 = VAR_4;

    prop->VAR_5 = VAR_5;

    prop->VAR_6 = VAR_6;



    QTAILQ_INSERT_TAIL(&VAR_0->properties, prop, node);

}

void FUNC_0(Object *VAR_0, const char *VAR_1, const char *VAR_2,
ObjectPropertyAccessor *VAR_3,
ObjectPropertyAccessor *VAR_4,
ObjectPropertyRelease *VAR_5,
void *VAR_6, Error **VAR_7)
{ ObjectProperty *prop; QTAILQ_FOREACH(prop, &VAR_0->properties, node) { if (strcmp(prop->VAR_1, VAR_1) == 0) { error_setg(VAR_7, "attempt to add duplicate property '%s'"
" to object (VAR_2 '%s')", VAR_1,
object_get_typename(VAR_0)); return; } } prop = g_malloc0(sizeof(*prop)); prop->VAR_1 = g_strdup(VAR_1); prop->VAR_2 = g_strdup(VAR_2); prop->VAR_3 = VAR_3; prop->VAR_4 = VAR_4; prop->VAR_5 = VAR_5; prop->VAR_6 = VAR_6; QTAILQ_INSERT_TAIL(&VAR_0->properties, prop, node); }