[libvirt] [dbus PATCH 02/18] util: there is no need to mark cleanup functions as inline
Daniel P. Berrangé
berrange at redhat.com
Tue Mar 13 10:10:59 UTC 2018
On Mon, Mar 12, 2018 at 05:21:32PM +0100, Pavel Hrdina wrote:
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> src/util.c | 34 ++++++++++++++++++++++++++++++++++
> src/util.h | 38 ++++++++------------------------------
> 2 files changed, 42 insertions(+), 30 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
> -static inline void
> -virtDBusUtilVirDomainFreep(virDomainPtr *domainp)
> -{
> - if (*domainp)
> - virDomainFree(*domainp);
> -}
> +void
> +virtDBusUtilVirDomainFreep(virDomainPtr *domainp);
I wonder if we should consider adding these convenience APIs to the official
libvirt API. What you're doing here would be needed in any C app that relies
on clenaup functions.
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 :|
More information about the libvir-list
mailing list