util: Define g_autoptr callback for FILE

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2020-04-01 01:01:27 +02:00
parent f600c42627
commit 8cb9d2495c

View File

@ -89,6 +89,7 @@ static inline void virForceCloseHelper(int *fd)
*/
#define VIR_AUTOCLOSE __attribute__((cleanup(virForceCloseHelper))) int
G_DEFINE_AUTOPTR_CLEANUP_FUNC(FILE, fclose);
/* Opaque type for managing a wrapper around a fd. */
struct _virFileWrapperFd;