qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type


From: François Revol
Subject: Re: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type
Date: Wed, 29 Jul 2009 12:42:53 +0200 CEST

> > I'm worried about all those void *s as they move responsibility for
> > type safety and lifecycle management to the user.  I'd much rather
> > see
> > a QObject (or Object) with the following methods:
> >
> >   clone() - deep copy an object; dicts will store copies so we'll
> > avoid those leaks or a dictionary member modified after it was
> > stored
> >   destroy()
> >   type() - return the type
> >   as_dict(), as_string(), as_int() - convert to a subclass so its
> > methods can be used
> >
> > Consider an operation such as printing out the dictionary, you have
> > to
> > know the types of the values.
> >
>
> Note, if we decide we want this it could be introduced later to avoid
> excessive churn on this patchset.

Might as well just use C++ then :^)

François.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]