Re: [PATCH 1/4] qom: make object_ref/unref use a void * instead of Object *.

2020-07-24 Thread Daniel P . Berrangé
On Thu, Jul 23, 2020 at 02:04:45PM -0500, Eric Blake wrote: > On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: > > The object_ref/unref methods are intended for use with any subclass of > > the base Object. Using "Object *" in the signature is not adding any > > meaningful level of type safety, since

Re: [PATCH 1/4] qom: make object_ref/unref use a void * instead of Object *.

2020-07-23 Thread Eric Blake
On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: The object_ref/unref methods are intended for use with any subclass of the base Object. Using "Object *" in the signature is not adding any meaningful level of type safety, since callers simply use "OBJECT(ptr)" and this expands to an unchecked cast "

[PATCH 1/4] qom: make object_ref/unref use a void * instead of Object *.

2020-07-23 Thread Daniel P . Berrangé
The object_ref/unref methods are intended for use with any subclass of the base Object. Using "Object *" in the signature is not adding any meaningful level of type safety, since callers simply use "OBJECT(ptr)" and this expands to an unchecked cast "(Object *)". By using "void *" we enable the ob