On Thu, Oct 31, 2024 at 03:22:07PM -0400, Peter Xu wrote: > On Thu, Oct 31, 2024 at 03:53:49PM +0000, Daniel P. Berrangé wrote: > > object_new() has a failure scenario where it will assert() if given > > an abstract type. Callers which are creating objects based on user > > input, or unknown/untrusted type names, must manually check the > > result of object_class_is_abstract() before calling object_new() > > to propagate an Error, instead of asserting. > > > > Introduce a object_new_dynamic() method which is a counterpart to > > object_new() that directly returns an Error, instead of asserting. > > This new method is to be used where the typename is specified > > dynamically by code separate from the immediate caller. > > > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > > Needs some patch order changes.. v.s. the previous one.
Opps, yes, of course. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|