Re: [RFC 3/5] convert code to object_new_dynamic() where appropriate

2024-11-01 Thread Daniel P . Berrangé
On Thu, Oct 31, 2024 at 03:21:17PM -0400, Peter Xu wrote: > On Thu, Oct 31, 2024 at 03:53:48PM +, Daniel P. Berrangé wrote: > > In cases where object_new() is not being passed a static, const > > string, the caller cannot be sure what type they are instantiating. > > There is a risk that instan

Re: [RFC 3/5] convert code to object_new_dynamic() where appropriate

2024-10-31 Thread Peter Xu
On Thu, Oct 31, 2024 at 03:53:48PM +, Daniel P. Berrangé wrote: > In cases where object_new() is not being passed a static, const > string, the caller cannot be sure what type they are instantiating. > There is a risk that instantiation could fail, if it is an abstract > type. > > Convert such

[RFC 3/5] convert code to object_new_dynamic() where appropriate

2024-10-31 Thread Daniel P . Berrangé
In cases where object_new() is not being passed a static, const string, the caller cannot be sure what type they are instantiating. There is a risk that instantiation could fail, if it is an abstract type. Convert such cases over to use object_new_dynamic() such that they are forced to expect fail