mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 04:25:19 +00:00
Remove virautoclean.h
Now that we no longer use any of the macros from this file, remove it. This also removes a typo. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9665fbb22a
commit
68fb03c7c0
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "domain_conf.h"
|
#include "domain_conf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
typedef const char * (*virDomainCapsValToStr)(int value);
|
typedef const char * (*virDomainCapsValToStr)(int value);
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "device_conf.h"
|
#include "device_conf.h"
|
||||||
#include "object_event.h"
|
#include "object_event.h"
|
||||||
#include "storage_adapter_conf.h"
|
#include "storage_adapter_conf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
#include "virxml.h"
|
#include "virxml.h"
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "domain_conf.h"
|
#include "domain_conf.h"
|
||||||
#include "qemu_conf.h"
|
#include "qemu_conf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virarch.h"
|
#include "virarch.h"
|
||||||
#include "virfirmware.h"
|
#include "virfirmware.h"
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "virxml.h"
|
#include "virxml.h"
|
||||||
#include "qemu_monitor.h"
|
#include "qemu_monitor.h"
|
||||||
#include "qemu_conf.h"
|
#include "qemu_conf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "domain_conf.h"
|
#include "domain_conf.h"
|
||||||
#include "qemu_conf.h"
|
#include "qemu_conf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virarch.h"
|
#include "virarch.h"
|
||||||
|
|
||||||
typedef struct _qemuVhostUser qemuVhostUser;
|
typedef struct _qemuVhostUser qemuVhostUser;
|
||||||
|
@ -17,7 +17,6 @@ UTIL_SOURCES = \
|
|||||||
util/virauth.h \
|
util/virauth.h \
|
||||||
util/virauthconfig.c \
|
util/virauthconfig.c \
|
||||||
util/virauthconfig.h \
|
util/virauthconfig.h \
|
||||||
util/virautoclean.h \
|
|
||||||
util/virbitmap.c \
|
util/virbitmap.c \
|
||||||
util/virbitmap.h \
|
util/virbitmap.h \
|
||||||
util/virbuffer.c \
|
util/virbuffer.c \
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virAuthConfig virAuthConfig;
|
typedef struct _virAuthConfig virAuthConfig;
|
||||||
typedef virAuthConfig *virAuthConfigPtr;
|
typedef virAuthConfig *virAuthConfigPtr;
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
/*
|
|
||||||
* virautoclean.h: automatic scope-based memory clearing helper macros for
|
|
||||||
* use in header files
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library. If not, see
|
|
||||||
* <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DEPRECATION WARNING
|
|
||||||
*
|
|
||||||
* The macros in this file should not be used in newly written code.
|
|
||||||
* Use the equivalent GLib macros instead.
|
|
||||||
*
|
|
||||||
* For existing code, use of the libvirt and GLib macros must NEVER
|
|
||||||
* be mixed within a single method.
|
|
||||||
*
|
|
||||||
* The use of the libvirt VIR_FREE macros should also not be mixed
|
|
||||||
* with GLib auto-free macros and vice-verca.
|
|
||||||
*
|
|
||||||
* Existing code should be converted to the new GLib macros and
|
|
||||||
* g_free APIs as needed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* VIR_DEFINE_AUTOPTR_FUNC:
|
|
||||||
* @type: type of the variable to be freed automatically
|
|
||||||
* @func: cleanup function to be automatically called
|
|
||||||
*
|
|
||||||
* This macro defines a function for automatic freeing of
|
|
||||||
* resources allocated to a variable of type @type. This newly
|
|
||||||
* defined function works as a necessary wrapper around @func.
|
|
||||||
*/
|
|
||||||
#define VIR_DEFINE_AUTOPTR_FUNC(t, f) \
|
|
||||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(t, f)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* VIR_DEFINE_AUTOCLEAN_FUNC:
|
|
||||||
* @type: type of the variable to be cleared automatically
|
|
||||||
* @func: cleanup function to be automatically called
|
|
||||||
*
|
|
||||||
* This macro defines a function for automatic clearing of
|
|
||||||
* resources in a stack'd variable of type @type. Note that @func must
|
|
||||||
* take pointer to @type.
|
|
||||||
*/
|
|
||||||
#define VIR_DEFINE_AUTOCLEAN_FUNC(type, func) \
|
|
||||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(type, func)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* VIR_AUTOPTR:
|
|
||||||
* @type: type of the variable to be freed automatically
|
|
||||||
*
|
|
||||||
* Macro to automatically free the memory allocated to
|
|
||||||
* the variable declared with it by calling the function
|
|
||||||
* defined by VIR_DEFINE_AUTOPTR_FUNC when the variable
|
|
||||||
* goes out of scope.
|
|
||||||
*
|
|
||||||
* Note that this macro must NOT be used with vectors! The freeing function
|
|
||||||
* will not free any elements beyond the first.
|
|
||||||
*/
|
|
||||||
#define VIR_AUTOPTR(type) g_autoptr(type)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* VIR_AUTOCLEAN:
|
|
||||||
* @type: type of the variable to be cleared automatically
|
|
||||||
*
|
|
||||||
* Macro to automatically call clearing function registered for variable of @type
|
|
||||||
* when the variable goes out of scope.
|
|
||||||
* The cleanup function is registered by VIR_DEFINE_AUTOCLEAN_FUNC macro for
|
|
||||||
* the given type.
|
|
||||||
*
|
|
||||||
* Note that this macro must NOT be used with vectors! The cleaning function
|
|
||||||
* will not clean any elements beyond the first.
|
|
||||||
*/
|
|
||||||
#define VIR_AUTOCLEAN(type) g_auto(type)
|
|
@ -22,7 +22,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virCommand virCommand;
|
typedef struct _virCommand virCommand;
|
||||||
typedef virCommand *virCommandPtr;
|
typedef virCommand *virCommandPtr;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virConfType:
|
* virConfType:
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#define VIR_ERROR_MAX_LENGTH 1024
|
#define VIR_ERROR_MAX_LENGTH 1024
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virbitmap.h"
|
#include "virbitmap.h"
|
||||||
#include "virstoragefile.h"
|
#include "virstoragefile.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VIR_FILE_CLOSE_PRESERVE_ERRNO = 1 << 0,
|
VIR_FILE_CLOSE_PRESERVE_ERRNO = 1 << 0,
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virFirewall virFirewall;
|
typedef struct _virFirewall virFirewall;
|
||||||
typedef virFirewall *virFirewallPtr;
|
typedef virFirewall *virFirewallPtr;
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The hash table.
|
* The hash table.
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virbitmap.h"
|
#include "virbitmap.h"
|
||||||
#include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#define VIR_MAC_BUFLEN 6
|
#define VIR_MAC_BUFLEN 6
|
||||||
#define VIR_MAC_HEXLEN (VIR_MAC_BUFLEN * 2)
|
#define VIR_MAC_HEXLEN (VIR_MAC_BUFLEN * 2)
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virobject.h"
|
#include "virobject.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "virmacaddr.h"
|
#include "virmacaddr.h"
|
||||||
#include "virpci.h"
|
#include "virpci.h"
|
||||||
#include "virnetdevvlan.h"
|
#include "virnetdevvlan.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
#ifdef HAVE_STRUCT_IFREQ
|
#ifdef HAVE_STRUCT_IFREQ
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "virsocketaddr.h"
|
#include "virsocketaddr.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virNetDevIPAddr virNetDevIPAddr;
|
typedef struct _virNetDevIPAddr virNetDevIPAddr;
|
||||||
typedef virNetDevIPAddr *virNetDevIPAddrPtr;
|
typedef virNetDevIPAddr *virNetDevIPAddrPtr;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include <virutil.h>
|
#include <virutil.h>
|
||||||
|
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virmacaddr.h"
|
#include "virmacaddr.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#if defined(__linux__) && defined(HAVE_LIBNL)
|
#if defined(__linux__) && defined(HAVE_LIBNL)
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "virmdev.h"
|
#include "virmdev.h"
|
||||||
#include "virobject.h"
|
#include "virobject.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
typedef struct _virPCIDevice virPCIDevice;
|
typedef struct _virPCIDevice virPCIDevice;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
/* Some Intel processor families introduced some RDT (Resource Director
|
/* Some Intel processor families introduced some RDT (Resource Director
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virobject.h"
|
#include "virobject.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virSCSIDevice virSCSIDevice;
|
typedef struct _virSCSIDevice virSCSIDevice;
|
||||||
typedef virSCSIDevice *virSCSIDevicePtr;
|
typedef virSCSIDevice *virSCSIDevicePtr;
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virobject.h"
|
#include "virobject.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virSCSIVHostDevice virSCSIVHostDevice;
|
typedef struct _virSCSIVHostDevice virSCSIVHostDevice;
|
||||||
typedef virSCSIVHostDevice *virSCSIVHostDevicePtr;
|
typedef virSCSIVHostDevice *virSCSIVHostDevicePtr;
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
/* On architectures which lack these limits, define them (ie. Cygwin).
|
/* On architectures which lack these limits, define them (ie. Cygwin).
|
||||||
* Note that the libvirt code should be robust enough to handle the
|
* Note that the libvirt code should be robust enough to handle the
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "virstorageencryption.h"
|
#include "virstorageencryption.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virsecret.h"
|
#include "virsecret.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
|
|
||||||
/* Minimum header size required to probe all known formats with
|
/* Minimum header size required to probe all known formats with
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virSystemdActivation virSystemdActivation;
|
typedef struct _virSystemdActivation virSystemdActivation;
|
||||||
typedef virSystemdActivation *virSystemdActivationPtr;
|
typedef virSystemdActivation *virSystemdActivationPtr;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virutil.h"
|
#include "virutil.h"
|
||||||
#include "virenum.h"
|
#include "virenum.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VIR_TYPED_PARAM_MULTIPLE:
|
* VIR_TYPED_PARAM_MULTIPLE:
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virconf.h"
|
#include "virconf.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _virURI virURI;
|
typedef struct _virURI virURI;
|
||||||
typedef virURI *virURIPtr;
|
typedef virURI *virURIPtr;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "virobject.h"
|
#include "virobject.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
#define USB_DEVFS "/dev/bus/usb/"
|
#define USB_DEVFS "/dev/bus/usb/"
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include <libxml/relaxng.h>
|
#include <libxml/relaxng.h>
|
||||||
|
|
||||||
#include "virbuffer.h"
|
#include "virbuffer.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
|
xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
|
||||||
G_GNUC_WARN_UNUSED_RESULT;
|
G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "qemu/qemu_conf.h"
|
#include "qemu/qemu_conf.h"
|
||||||
#include "qemu/qemu_monitor.h"
|
#include "qemu/qemu_monitor.h"
|
||||||
#include "qemu/qemu_agent.h"
|
#include "qemu/qemu_agent.h"
|
||||||
#include "virautoclean.h"
|
|
||||||
|
|
||||||
typedef struct _qemuMonitorTest qemuMonitorTest;
|
typedef struct _qemuMonitorTest qemuMonitorTest;
|
||||||
typedef qemuMonitorTest *qemuMonitorTestPtr;
|
typedef qemuMonitorTest *qemuMonitorTestPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user