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:
Ján Tomko 2019-10-15 16:04:32 +02:00
parent 9665fbb22a
commit 68fb03c7c0
35 changed files with 0 additions and 124 deletions

View File

@ -22,7 +22,6 @@
#include "internal.h"
#include "domain_conf.h"
#include "virautoclean.h"
#include "virenum.h"
typedef const char * (*virDomainCapsValToStr)(int value);

View File

@ -29,7 +29,6 @@
#include "device_conf.h"
#include "object_event.h"
#include "storage_adapter_conf.h"
#include "virautoclean.h"
#include "virenum.h"
#include "virxml.h"

View File

@ -22,7 +22,6 @@
#include "domain_conf.h"
#include "qemu_conf.h"
#include "virautoclean.h"
#include "virarch.h"
#include "virfirmware.h"

View File

@ -27,7 +27,6 @@
#include "virxml.h"
#include "qemu_monitor.h"
#include "qemu_conf.h"
#include "virautoclean.h"
#include "virenum.h"
typedef enum {

View File

@ -22,7 +22,6 @@
#include "domain_conf.h"
#include "qemu_conf.h"
#include "virautoclean.h"
#include "virarch.h"
typedef struct _qemuVhostUser qemuVhostUser;

View File

@ -17,7 +17,6 @@ UTIL_SOURCES = \
util/virauth.h \
util/virauthconfig.c \
util/virauthconfig.h \
util/virautoclean.h \
util/virbitmap.c \
util/virbitmap.h \
util/virbuffer.c \

View File

@ -21,7 +21,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
typedef struct _virAuthConfig virAuthConfig;
typedef virAuthConfig *virAuthConfigPtr;

View File

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

View File

@ -22,7 +22,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
#include <sys/types.h>

View File

@ -23,7 +23,6 @@
#include <stdarg.h>
#include "internal.h"
#include "virautoclean.h"
/**

View File

@ -23,7 +23,6 @@
#include "internal.h"
#include "virbuffer.h"
#include "virautoclean.h"
typedef struct _virCommand virCommand;
typedef virCommand *virCommandPtr;

View File

@ -22,7 +22,6 @@
#include "virutil.h"
#include "virenum.h"
#include "virautoclean.h"
/**
* virConfType:

View File

@ -22,7 +22,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
#define VIR_ERROR_MAX_LENGTH 1024

View File

@ -29,7 +29,6 @@
#include "internal.h"
#include "virbitmap.h"
#include "virstoragefile.h"
#include "virautoclean.h"
typedef enum {
VIR_FILE_CLOSE_PRESERVE_ERRNO = 1 << 0,

View File

@ -21,7 +21,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
typedef struct _virFirewall virFirewall;
typedef virFirewall *virFirewallPtr;

View File

@ -9,8 +9,6 @@
#pragma once
#include "virautoclean.h"
/*
* The hash table.
*/

View File

@ -25,7 +25,6 @@
#include "internal.h"
#include "virbitmap.h"
#include "virbuffer.h"
#include "virautoclean.h"
#include <stdarg.h>

View File

@ -21,7 +21,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
#define VIR_MAC_BUFLEN 6
#define VIR_MAC_HEXLEN (VIR_MAC_BUFLEN * 2)

View File

@ -21,7 +21,6 @@
#include "internal.h"
#include "virobject.h"
#include "virutil.h"
#include "virautoclean.h"
#include "virenum.h"
typedef enum {

View File

@ -25,7 +25,6 @@
#include "virmacaddr.h"
#include "virpci.h"
#include "virnetdevvlan.h"
#include "virautoclean.h"
#include "virenum.h"
#ifdef HAVE_STRUCT_IFREQ

View File

@ -19,7 +19,6 @@
#pragma once
#include "virsocketaddr.h"
#include "virautoclean.h"
typedef struct _virNetDevIPAddr virNetDevIPAddr;
typedef virNetDevIPAddr *virNetDevIPAddrPtr;

View File

@ -20,7 +20,6 @@
#include <virutil.h>
#include "virautoclean.h"
#include "virenum.h"
typedef enum {

View File

@ -21,7 +21,6 @@
#include "internal.h"
#include "virmacaddr.h"
#include "virautoclean.h"
#if defined(__linux__) && defined(HAVE_LIBNL)

View File

@ -24,7 +24,6 @@
#include "virmdev.h"
#include "virobject.h"
#include "virutil.h"
#include "virautoclean.h"
#include "virenum.h"
typedef struct _virPCIDevice virPCIDevice;

View File

@ -19,7 +19,6 @@
#pragma once
#include "virutil.h"
#include "virautoclean.h"
#include "virenum.h"
/* Some Intel processor families introduced some RDT (Resource Director

View File

@ -22,7 +22,6 @@
#include "internal.h"
#include "virobject.h"
#include "virautoclean.h"
typedef struct _virSCSIDevice virSCSIDevice;
typedef virSCSIDevice *virSCSIDevicePtr;

View File

@ -23,7 +23,6 @@
#include "internal.h"
#include "virobject.h"
#include "virutil.h"
#include "virautoclean.h"
typedef struct _virSCSIVHostDevice virSCSIVHostDevice;
typedef virSCSIVHostDevice *virSCSIVHostDevicePtr;

View File

@ -25,7 +25,6 @@
#endif
#include "internal.h"
#include "virautoclean.h"
/* On architectures which lack these limits, define them (ie. Cygwin).
* Note that the libvirt code should be robust enough to handle the

View File

@ -29,7 +29,6 @@
#include "virstorageencryption.h"
#include "virutil.h"
#include "virsecret.h"
#include "virautoclean.h"
#include "virenum.h"
/* Minimum header size required to probe all known formats with

View File

@ -22,7 +22,6 @@
#pragma once
#include "internal.h"
#include "virautoclean.h"
typedef struct _virSystemdActivation virSystemdActivation;
typedef virSystemdActivation *virSystemdActivationPtr;

View File

@ -24,7 +24,6 @@
#include "internal.h"
#include "virutil.h"
#include "virenum.h"
#include "virautoclean.h"
/**
* VIR_TYPED_PARAM_MULTIPLE:

View File

@ -24,7 +24,6 @@
#include "internal.h"
#include "virconf.h"
#include "virautoclean.h"
typedef struct _virURI virURI;
typedef virURI *virURIPtr;

View File

@ -22,7 +22,6 @@
#include "internal.h"
#include "virobject.h"
#include "virautoclean.h"
#define USB_DEVFS "/dev/bus/usb/"

View File

@ -28,7 +28,6 @@
#include <libxml/relaxng.h>
#include "virbuffer.h"
#include "virautoclean.h"
xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
G_GNUC_WARN_UNUSED_RESULT;

View File

@ -23,7 +23,6 @@
#include "qemu/qemu_conf.h"
#include "qemu/qemu_monitor.h"
#include "qemu/qemu_agent.h"
#include "virautoclean.h"
typedef struct _qemuMonitorTest qemuMonitorTest;
typedef qemuMonitorTest *qemuMonitorTestPtr;