Re: [PATCH v2 1/8] qom: refactor checking abstract property when creating instances

2024-11-15 Thread Daniel P . Berrangé
On Thu, Nov 14, 2024 at 02:58:56PM -0500, Peter Xu wrote: > On Mon, Nov 11, 2024 at 03:55:48PM +, Daniel P. Berrangé wrote: > > @@ -753,7 +761,7 @@ typedef union { > > } qemu_max_align_t; > > #endif > > > > -static Object *object_new_with_type(Type type) > > +static Object *object_new_with_

Re: [PATCH v2 1/8] qom: refactor checking abstract property when creating instances

2024-11-14 Thread Peter Xu
On Mon, Nov 11, 2024 at 03:55:48PM +, Daniel P. Berrangé wrote: > @@ -753,7 +761,7 @@ typedef union { > } qemu_max_align_t; > #endif > > -static Object *object_new_with_type(Type type) > +static Object *object_new_with_type(Type type, Error **errp) > { > Object *obj; > size_t siz

[PATCH v2 1/8] qom: refactor checking abstract property when creating instances

2024-11-11 Thread Daniel P . Berrangé
Push an Error object into object_initialize_with_type, so that reporting of attempts to create an abstract type is handled at the lowest level. Signed-off-by: Daniel P. Berrangé --- qom/object.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/