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
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)
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