]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove virautoclean.h
authorJán Tomko <jtomko@redhat.com>
Tue, 15 Oct 2019 14:04:32 +0000 (16:04 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 16 Oct 2019 10:06:44 +0000 (12:06 +0200)
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>
35 files changed:
src/conf/domain_capabilities.h
src/conf/storage_conf.h
src/qemu/qemu_firmware.h
src/qemu/qemu_migration_params.h
src/qemu/qemu_vhost_user.h
src/util/Makefile.inc.am
src/util/virauthconfig.h
src/util/virautoclean.h [deleted file]
src/util/virbitmap.h
src/util/virbuffer.h
src/util/vircommand.h
src/util/virconf.h
src/util/virerror.h
src/util/virfile.h
src/util/virfirewall.h
src/util/virhash.h
src/util/virjson.h
src/util/virmacaddr.h
src/util/virmdev.h
src/util/virnetdev.h
src/util/virnetdevip.h
src/util/virnetdevvlan.h
src/util/virnetlink.h
src/util/virpci.h
src/util/virperf.h
src/util/virscsi.h
src/util/virscsivhost.h
src/util/virsocketaddr.h
src/util/virstoragefile.h
src/util/virsystemd.h
src/util/virtypedparam.h
src/util/viruri.h
src/util/virusb.h
src/util/virxml.h
tests/qemumonitortestutils.h

index b5c322fd9084b5298e08f2065e821426e4b60f8e..a31458c65308d6386ea6659ff4186119ee31f8bd 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "internal.h"
 #include "domain_conf.h"
-#include "virautoclean.h"
 #include "virenum.h"
 
 typedef const char * (*virDomainCapsValToStr)(int value);
index b172e82ccbde2cf50c597dffc14dc1c76be729ca..d2600efff04de3d8aee9c249c2029c19fe67d829 100644 (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"
 
index 10b8eb822bb9d61ff2f3d9e971daf96c51adc860..4be65bc66411c6e29bac7cc1675e2c32bf2299f6 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "domain_conf.h"
 #include "qemu_conf.h"
-#include "virautoclean.h"
 #include "virarch.h"
 #include "virfirmware.h"
 
index e8380e6fb177d6dd204eee76dacd6872f21efb11..9aea24725f0a1d20c952b183e4197b323887bc18 100644 (file)
@@ -27,7 +27,6 @@
 #include "virxml.h"
 #include "qemu_monitor.h"
 #include "qemu_conf.h"
-#include "virautoclean.h"
 #include "virenum.h"
 
 typedef enum {
index 6bb5f5807c946adf7e7aadd405d07242f295f43f..369ba00caacce30964d4c7862004cc5d3c86d4d7 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "domain_conf.h"
 #include "qemu_conf.h"
-#include "virautoclean.h"
 #include "virarch.h"
 
 typedef struct _qemuVhostUser qemuVhostUser;
index 9747816fac083e60f7e783745c321168a63c6d5b..705b93c93c6287fd54d0afde86760f2fdef240b3 100644 (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 \
index 44bef7e2bedd6ea87f3eec57a6a8628351ca904b..de28b1ff284161513499b1cb81230d8b4377e798 100644 (file)
@@ -21,7 +21,6 @@
 #pragma once
 
 #include "internal.h"
-#include "virautoclean.h"
 
 typedef struct _virAuthConfig virAuthConfig;
 typedef virAuthConfig *virAuthConfigPtr;
diff --git a/src/util/virautoclean.h b/src/util/virautoclean.h
deleted file mode 100644 (file)
index 71312a2..0000000
+++ /dev/null
@@ -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)
index e0c5541c13c29de18e3fb710447bd08c785d1576..7f1a109c012ec4e33f5d579e1a7790acdc97eddc 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include "internal.h"
-#include "virautoclean.h"
 
 #include <sys/types.h>
 
index 0c074121bcd90ff7f54b4741528028751100a0ca..ff24ab10196c12f2032e70941b5ec8dc3640dd8e 100644 (file)
@@ -23,7 +23,6 @@
 #include <stdarg.h>
 
 #include "internal.h"
-#include "virautoclean.h"
 
 
 /**
index 2f39dec1b3375dd627402895855d16324388e646..9086f9a90caaacdbcdaabb2cce50a59a4a695054 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "internal.h"
 #include "virbuffer.h"
-#include "virautoclean.h"
 
 typedef struct _virCommand virCommand;
 typedef virCommand *virCommandPtr;
index 304b325985833fb33031439905d0a175154a5eba..0b2de34d36b0433056b6c07268e2f3b4527d3432 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "virutil.h"
 #include "virenum.h"
-#include "virautoclean.h"
 
 /**
  * virConfType:
index 7e5ed29ae29aa2127485b627715027edd8765002..2e27655b72d75bbfd4c44a31adc72ec07a135376 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include "internal.h"
-#include "virautoclean.h"
 
 #define VIR_ERROR_MAX_LENGTH 1024
 
index b8256a96b3b16b7bb5530e23c722bf17873dab08..a570529330957b8b371c23b424f344a6d5d2fc55 100644 (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,
index bcc1437b9a6c33ccad10edea231779d58cb14ccf..6148f46827291c351188b65eebcbbd130a83deef 100644 (file)
@@ -21,7 +21,6 @@
 #pragma once
 
 #include "internal.h"
-#include "virautoclean.h"
 
 typedef struct _virFirewall virFirewall;
 typedef virFirewall *virFirewallPtr;
index 5bb59376af76edcb4fa68abf0487e2d956b243e0..b5e7c79260205b5eb74ee1c5ae100d9cb8de50f1 100644 (file)
@@ -9,8 +9,6 @@
 
 #pragma once
 
-#include "virautoclean.h"
-
 /*
  * The hash table.
  */
index 1ce7b75e3ba155c0152036b28bc90e3c5b35cb3f..fa8571c73ba2f7edead83f0e0a43c6d57d49be03 100644 (file)
@@ -25,7 +25,6 @@
 #include "internal.h"
 #include "virbitmap.h"
 #include "virbuffer.h"
-#include "virautoclean.h"
 
 #include <stdarg.h>
 
index 2fda2b023915e12e21000bda3079c36295770e20..0296cfa965ff8d5cab3406650924b22e21e73805 100644 (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)
index 2f73b1a53071db3edd332030b8c50fe141a0cfe5..e0905a3f6ebbc72efb55a80e9f6c7497bde00ec4 100644 (file)
@@ -21,7 +21,6 @@
 #include "internal.h"
 #include "virobject.h"
 #include "virutil.h"
-#include "virautoclean.h"
 #include "virenum.h"
 
 typedef enum {
index ea3779bb9881ffed5db9ddb421c42ccda23f2523..b5a5214bcbbead464d65adb716803bd85c7c6e30 100644 (file)
@@ -25,7 +25,6 @@
 #include "virmacaddr.h"
 #include "virpci.h"
 #include "virnetdevvlan.h"
-#include "virautoclean.h"
 #include "virenum.h"
 
 #ifdef HAVE_STRUCT_IFREQ
index 59d2d4a04488f6d554a7cb3b58892b1d0eb35124..1fa6dd8836095b23ee71526f6b9214761b05f667 100644 (file)
@@ -19,7 +19,6 @@
 #pragma once
 
 #include "virsocketaddr.h"
-#include "virautoclean.h"
 
 typedef struct _virNetDevIPAddr virNetDevIPAddr;
 typedef virNetDevIPAddr *virNetDevIPAddrPtr;
index 0e4fd03dcb33e780cb2b35207eed780b6b432ef4..9dbf07a6e2cd5ba92e5c67793668001264bf713b 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <virutil.h>
 
-#include "virautoclean.h"
 #include "virenum.h"
 
 typedef enum {
index 5cb6060b3b07260df0b2f62607938d9e60920096..030547e573e6e60b95b1f573d8612895d957fb4f 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "internal.h"
 #include "virmacaddr.h"
-#include "virautoclean.h"
 
 #if defined(__linux__) && defined(HAVE_LIBNL)
 
index 4ffe5db2d65131faeecd1409c6b1be0e3fe6f7b3..cfb4581edf723d83a49d2efe956d442619b67b56 100644 (file)
@@ -24,7 +24,6 @@
 #include "virmdev.h"
 #include "virobject.h"
 #include "virutil.h"
-#include "virautoclean.h"
 #include "virenum.h"
 
 typedef struct _virPCIDevice virPCIDevice;
index df990109b1105e2a2df29b29d812b1b47b62f3ed..3102b42af9fb8295b216b2b49e84b681f45236fe 100644 (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
index 3a92366efcbdbf591039fcc7f3f518f0c2ad9e31..51627e0c05c833fcf2bdd5489c219067decc4930 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "internal.h"
 #include "virobject.h"
-#include "virautoclean.h"
 
 typedef struct _virSCSIDevice virSCSIDevice;
 typedef virSCSIDevice *virSCSIDevicePtr;
index d3185b14bc43d0aa622932e8898c6d49d629ad40..a5296890cd8e2b7ae0bb9e6be8ea0b8bddc54417 100644 (file)
@@ -23,7 +23,6 @@
 #include "internal.h"
 #include "virobject.h"
 #include "virutil.h"
-#include "virautoclean.h"
 
 typedef struct _virSCSIVHostDevice virSCSIVHostDevice;
 typedef virSCSIVHostDevice *virSCSIVHostDevicePtr;
index 6cdf7b7c4f651f45835833bc4e68de5ba51c0561..1180864f069ad783ee0319fdaf59f5733e96872b 100644 (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
index 545e60ba007e3b191ad7d9088261166d0392238c..c357803e502ec444b671786394e710706d29a0a2 100644 (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
index fcdf6d17fe84438190cdc5be50a7d16cb28daf7d..dfea75948b5d9dffd13b6f4f13f79b86791abf90 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include "internal.h"
-#include "virautoclean.h"
 
 typedef struct _virSystemdActivation virSystemdActivation;
 typedef virSystemdActivation *virSystemdActivationPtr;
index 42a4da466e91543db1ff97b2d7942d60d8c71f49..ea48ee5009e29c0e7710d803a49b5f428b830f60 100644 (file)
@@ -24,7 +24,6 @@
 #include "internal.h"
 #include "virutil.h"
 #include "virenum.h"
-#include "virautoclean.h"
 
 /**
  * VIR_TYPED_PARAM_MULTIPLE:
index f91debefe90de8cf582915ce7c591138fb5f3a6e..b7f845f41f98e2fe2ad11f980faf7e8ea19bf755 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "internal.h"
 #include "virconf.h"
-#include "virautoclean.h"
 
 typedef struct _virURI virURI;
 typedef virURI *virURIPtr;
index 7ff1d55c9ed9c93cd9879545b1ab93057c952131..42a3303952b22cf100d6b1cdd73ee15b7a9c9435 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "internal.h"
 #include "virobject.h"
-#include "virautoclean.h"
 
 #define USB_DEVFS "/dev/bus/usb/"
 
index 283c592b2c420ca24b2a3e0f0004d65150923583..dfdc1f73c3e91304ab35bf1b22ac494dc143502b 100644 (file)
@@ -28,7 +28,6 @@
 #include <libxml/relaxng.h>
 
 #include "virbuffer.h"
-#include "virautoclean.h"
 
 xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
     G_GNUC_WARN_UNUSED_RESULT;
index f6d7f3623c6330cdb6f214830023b22a480b48e5..8e213ec9216f5b36f91da19d3797b53e23a2130c 100644 (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;