Re: [libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread John Ferlan
On 05/30/2017 08:13 AM, Bjoern Walk wrote: > John Ferlan [2017-05-30, 06:43AM -0400]: >> [...] >> void >> -virInterfaceObjFree(virInterfaceObjPtr obj) >> +virInterfaceObjEndAPI(virInterfaceObjPtr *obj) > > Naming is hard, and I don't have any better suggestion. Just wanted to > say that the nam

Re: [libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread Bjoern Walk
John Ferlan [2017-05-30, 06:43AM -0400]: [...] void -virInterfaceObjFree(virInterfaceObjPtr obj) +virInterfaceObjEndAPI(virInterfaceObjPtr *obj) Naming is hard, and I don't have any better suggestion. Just wanted to say that the name is, maybe, improvable :) { -if (!obj) +if (!*obj)

[libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread John Ferlan
Now that we have a bit more control, let's convert our object into a lockable object and let that magic handle the create and lock/unlock. This commit also introduces virInterfaceObjEndAPI in order to handle the lock unlock and object unref in one call for consumers returning a NULL obj upon retur