mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
f600c42627
commit
8cb9d2495c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue