Re: [Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-18 Thread Anthony Liguori
On 06/18/2012 08:51 AM, Andreas Färber wrote: Am 18.06.2012 15:46, schrieb Peter Crosthwaite: +#define HERBIVORE(obj) \ +INTERFACE_CHECK(Herbivore, (obj), TYPE_HERBIVORE) + +typedef struct Herbivore +{ +Object obj; +} Herbivore; All this is doing is saying Herbivores are Objects right

Re: [Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-18 Thread Andreas Färber
Am 18.06.2012 15:46, schrieb Peter Crosthwaite: +#define HERBIVORE(obj) \ +INTERFACE_CHECK(Herbivore, (obj), TYPE_HERBIVORE) + +typedef struct Herbivore +{ +Object obj; +} Herbivore; >>> >>> >>> All this is doing is saying Herbivores are Objects right? A u

Re: [Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-18 Thread Peter Crosthwaite
>>> +#define HERBIVORE(obj) \ >>> +    INTERFACE_CHECK(Herbivore, (obj), TYPE_HERBIVORE) >>> + >>> +typedef struct Herbivore >>> +{ >>> +    Object obj; >>> +} Herbivore; >> >> >> All this is doing is saying Herbivores are Objects right? A user cant >> add anything to this struct given that interfa

Re: [Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-18 Thread Anthony Liguori
On 06/16/2012 05:31 AM, Peter Crosthwaite wrote: On Thu, Jun 14, 2012 at 6:55 AM, Anthony Liguori wrote: Signed-off-by: Anthony Liguori Reviewed-by: Peter A.G. Crosthwaite --- tests/Makefile |5 +- tests/test-object.c | 222 +++

Re: [Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-16 Thread Peter Crosthwaite
On Thu, Jun 14, 2012 at 6:55 AM, Anthony Liguori wrote: > Signed-off-by: Anthony Liguori Reviewed-by: Peter A.G. Crosthwaite > --- >  tests/Makefile      |    5 +- >  tests/test-object.c |  222 > +++ >  2 files changed, 226 insertions(+), 1 dele

[Qemu-devel] [PATCH 3/3] qom: add unit test for Interfaces

2012-06-13 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- tests/Makefile |5 +- tests/test-object.c | 222 +++ 2 files changed, 226 insertions(+), 1 deletions(-) create mode 100644 tests/test-object.c diff --git a/tests/Makefile b/tests/Makefile index d66ab19.