On 11/30/2011 11:03 PM, Anthony Liguori wrote:
> Links represent an ephemeral relationship between devices.  They are meant to
> replace the qdev concept of busses by allowing more informal relationships
> between devices.

So, links are equivalent to pointers?

> Links are fairly limited in their usefulness without implementing QOM-style
> subclassing and interfaces.
>
>  
> +static void qdev_get_link_property(DeviceState *dev, Visitor *v, void 
> *opaque,
> +                                   const char *name, Error **errp)
> +{
> +    DeviceState **child = opaque;
> +    gchar *path;
> +
> +    if (*child) {
> +        path = qdev_get_canonical_path(*child);
> +        visit_type_str(v, &path, name, errp);
> +        g_free(path);
> +    } else {
> +        path = (gchar *)"";

If gchar != char, this is wrong.  Also, you're converting a const
pointer into a non-const pointer, discarding type safety.

> +        visit_type_str(v, &path, name, errp);
> +    }

Shouldn't this be visit_type_link()?


-- 
error compiling committee.c: too many arguments to function


Reply via email to