From nobody Mon Feb 9 03:47:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1571151833; cv=none; d=zoho.com; s=zohoarc; b=Dx1j8Ufkhh94mjc6y4YFgwnwb+QIN5bWhl4L2BEw3IM0LzzSDBvMU+O8jqNb8VTeZjSVvymX64TMEAj80kKiA5BQeD1ToAtH0qllQXLiOgQbcvlGKwCkmj363qgITltlaWlKhSGP600lBxCKLzUXwxO/vnBN1s/z0AkSvfi+hMw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571151833; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BhZTrt8/+TKEp4IDLB92uc/Id1cIZia8Aps1OFOEeJg=; b=XoPPk1lt/nPou8rx0al2jd7Pw9Pg2rYKkwTBcxFrKOmSoRDfyCrxYQBpkL1JVxyXxtdBC/v5SNnPf3chQvvN+1DpvJ998HsuT0xzPVZ4V9DRXzjPulmp1g2f1I/eytAYSzJsh7zQJGQlCcCNlRIjQ69scl1BSWbXaXGCyqEkmdA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1571151833980703.2359934009833; Tue, 15 Oct 2019 08:03:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 79C0E30224AC; Tue, 15 Oct 2019 15:03:52 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 473B75C290; Tue, 15 Oct 2019 15:03:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 06D611808878; Tue, 15 Oct 2019 15:03:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x9FF3TV0022804 for ; Tue, 15 Oct 2019 11:03:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C3BF60C57; Tue, 15 Oct 2019 15:03:29 +0000 (UTC) Received: from icr.brq.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E833460BE2 for ; Tue, 15 Oct 2019 15:03:28 +0000 (UTC) From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Tue, 15 Oct 2019 17:03:14 +0200 Message-Id: <3b53e876e0bac80e135917d1150f17dad0805166.1571151764.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 9/9] Remove virautoclean.h X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 15 Oct 2019 15:03:52 +0000 (UTC) Now that we no longer use any of the macros from this file, remove it. This also removes a typo. Signed-off-by: J=C3=A1n Tomko --- src/conf/domain_capabilities.h | 1 - src/conf/storage_conf.h | 1 - src/qemu/qemu_firmware.h | 1 - src/qemu/qemu_migration_params.h | 1 - src/qemu/qemu_vhost_user.h | 1 - src/util/Makefile.inc.am | 1 - src/util/virauthconfig.h | 1 - src/util/virautoclean.h | 89 -------------------------------- src/util/virbitmap.h | 1 - src/util/virbuffer.h | 1 - src/util/vircommand.h | 1 - src/util/virconf.h | 1 - src/util/virerror.h | 1 - src/util/virfile.h | 1 - src/util/virfirewall.h | 1 - src/util/virhash.h | 2 - src/util/virjson.h | 1 - src/util/virmacaddr.h | 1 - src/util/virmdev.h | 1 - src/util/virnetdev.h | 1 - src/util/virnetdevip.h | 1 - src/util/virnetdevvlan.h | 1 - src/util/virnetlink.h | 1 - src/util/virpci.h | 1 - src/util/virperf.h | 1 - src/util/virscsi.h | 1 - src/util/virscsivhost.h | 1 - src/util/virsocketaddr.h | 1 - src/util/virstoragefile.h | 1 - src/util/virsystemd.h | 1 - src/util/virtypedparam.h | 1 - src/util/viruri.h | 1 - src/util/virusb.h | 1 - src/util/virxml.h | 1 - tests/qemumonitortestutils.h | 1 - 35 files changed, 124 deletions(-) delete mode 100644 src/util/virautoclean.h diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index b5c322fd90..a31458c653 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -22,7 +22,6 @@ =20 #include "internal.h" #include "domain_conf.h" -#include "virautoclean.h" #include "virenum.h" =20 typedef const char * (*virDomainCapsValToStr)(int value); diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index b172e82ccb..d2600efff0 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -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" =20 diff --git a/src/qemu/qemu_firmware.h b/src/qemu/qemu_firmware.h index 10b8eb822b..4be65bc664 100644 --- a/src/qemu/qemu_firmware.h +++ b/src/qemu/qemu_firmware.h @@ -22,7 +22,6 @@ =20 #include "domain_conf.h" #include "qemu_conf.h" -#include "virautoclean.h" #include "virarch.h" #include "virfirmware.h" =20 diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_par= ams.h index e8380e6fb1..9aea24725f 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -27,7 +27,6 @@ #include "virxml.h" #include "qemu_monitor.h" #include "qemu_conf.h" -#include "virautoclean.h" #include "virenum.h" =20 typedef enum { diff --git a/src/qemu/qemu_vhost_user.h b/src/qemu/qemu_vhost_user.h index 6bb5f5807c..369ba00caa 100644 --- a/src/qemu/qemu_vhost_user.h +++ b/src/qemu/qemu_vhost_user.h @@ -22,7 +22,6 @@ =20 #include "domain_conf.h" #include "qemu_conf.h" -#include "virautoclean.h" #include "virarch.h" =20 typedef struct _qemuVhostUser qemuVhostUser; diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am index 9747816fac..705b93c93c 100644 --- a/src/util/Makefile.inc.am +++ b/src/util/Makefile.inc.am @@ -17,7 +17,6 @@ UTIL_SOURCES =3D \ util/virauth.h \ util/virauthconfig.c \ util/virauthconfig.h \ - util/virautoclean.h \ util/virbitmap.c \ util/virbitmap.h \ util/virbuffer.c \ diff --git a/src/util/virauthconfig.h b/src/util/virauthconfig.h index 44bef7e2be..de28b1ff28 100644 --- a/src/util/virauthconfig.h +++ b/src/util/virauthconfig.h @@ -21,7 +21,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 typedef struct _virAuthConfig virAuthConfig; typedef virAuthConfig *virAuthConfigPtr; diff --git a/src/util/virautoclean.h b/src/util/virautoclean.h deleted file mode 100644 index 71312a2782..0000000000 --- a/src/util/virautoclean.h +++ /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 - * . - * - */ - -#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 o= f @type - * when the variable goes out of scope. - * The cleanup function is registered by VIR_DEFINE_AUTOCLEAN_FUNC macro f= or - * the given type. - * - * Note that this macro must NOT be used with vectors! The cleaning functi= on - * will not clean any elements beyond the first. - */ -#define VIR_AUTOCLEAN(type) g_auto(type) diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h index e0c5541c13..7f1a109c01 100644 --- a/src/util/virbitmap.h +++ b/src/util/virbitmap.h @@ -22,7 +22,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 #include =20 diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h index 0c074121bc..ff24ab1019 100644 --- a/src/util/virbuffer.h +++ b/src/util/virbuffer.h @@ -23,7 +23,6 @@ #include =20 #include "internal.h" -#include "virautoclean.h" =20 =20 /** diff --git a/src/util/vircommand.h b/src/util/vircommand.h index 2f39dec1b3..9086f9a90c 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -23,7 +23,6 @@ =20 #include "internal.h" #include "virbuffer.h" -#include "virautoclean.h" =20 typedef struct _virCommand virCommand; typedef virCommand *virCommandPtr; diff --git a/src/util/virconf.h b/src/util/virconf.h index 304b325985..0b2de34d36 100644 --- a/src/util/virconf.h +++ b/src/util/virconf.h @@ -22,7 +22,6 @@ =20 #include "virutil.h" #include "virenum.h" -#include "virautoclean.h" =20 /** * virConfType: diff --git a/src/util/virerror.h b/src/util/virerror.h index 7e5ed29ae2..2e27655b72 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -22,7 +22,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 #define VIR_ERROR_MAX_LENGTH 1024 =20 diff --git a/src/util/virfile.h b/src/util/virfile.h index b8256a96b3..a570529330 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -29,7 +29,6 @@ #include "internal.h" #include "virbitmap.h" #include "virstoragefile.h" -#include "virautoclean.h" =20 typedef enum { VIR_FILE_CLOSE_PRESERVE_ERRNO =3D 1 << 0, diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h index bcc1437b9a..6148f46827 100644 --- a/src/util/virfirewall.h +++ b/src/util/virfirewall.h @@ -21,7 +21,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 typedef struct _virFirewall virFirewall; typedef virFirewall *virFirewallPtr; diff --git a/src/util/virhash.h b/src/util/virhash.h index 5bb59376af..b5e7c79260 100644 --- a/src/util/virhash.h +++ b/src/util/virhash.h @@ -9,8 +9,6 @@ =20 #pragma once =20 -#include "virautoclean.h" - /* * The hash table. */ diff --git a/src/util/virjson.h b/src/util/virjson.h index 1ce7b75e3b..fa8571c73b 100644 --- a/src/util/virjson.h +++ b/src/util/virjson.h @@ -25,7 +25,6 @@ #include "internal.h" #include "virbitmap.h" #include "virbuffer.h" -#include "virautoclean.h" =20 #include =20 diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h index 2fda2b0239..0296cfa965 100644 --- a/src/util/virmacaddr.h +++ b/src/util/virmacaddr.h @@ -21,7 +21,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 #define VIR_MAC_BUFLEN 6 #define VIR_MAC_HEXLEN (VIR_MAC_BUFLEN * 2) diff --git a/src/util/virmdev.h b/src/util/virmdev.h index 2f73b1a530..e0905a3f6e 100644 --- a/src/util/virmdev.h +++ b/src/util/virmdev.h @@ -21,7 +21,6 @@ #include "internal.h" #include "virobject.h" #include "virutil.h" -#include "virautoclean.h" #include "virenum.h" =20 typedef enum { diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index ea3779bb98..b5a5214bcb 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -25,7 +25,6 @@ #include "virmacaddr.h" #include "virpci.h" #include "virnetdevvlan.h" -#include "virautoclean.h" #include "virenum.h" =20 #ifdef HAVE_STRUCT_IFREQ diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h index 59d2d4a044..1fa6dd8836 100644 --- a/src/util/virnetdevip.h +++ b/src/util/virnetdevip.h @@ -19,7 +19,6 @@ #pragma once =20 #include "virsocketaddr.h" -#include "virautoclean.h" =20 typedef struct _virNetDevIPAddr virNetDevIPAddr; typedef virNetDevIPAddr *virNetDevIPAddrPtr; diff --git a/src/util/virnetdevvlan.h b/src/util/virnetdevvlan.h index 0e4fd03dcb..9dbf07a6e2 100644 --- a/src/util/virnetdevvlan.h +++ b/src/util/virnetdevvlan.h @@ -20,7 +20,6 @@ =20 #include =20 -#include "virautoclean.h" #include "virenum.h" =20 typedef enum { diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 5cb6060b3b..030547e573 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -21,7 +21,6 @@ =20 #include "internal.h" #include "virmacaddr.h" -#include "virautoclean.h" =20 #if defined(__linux__) && defined(HAVE_LIBNL) =20 diff --git a/src/util/virpci.h b/src/util/virpci.h index 4ffe5db2d6..cfb4581edf 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -24,7 +24,6 @@ #include "virmdev.h" #include "virobject.h" #include "virutil.h" -#include "virautoclean.h" #include "virenum.h" =20 typedef struct _virPCIDevice virPCIDevice; diff --git a/src/util/virperf.h b/src/util/virperf.h index df990109b1..3102b42af9 100644 --- a/src/util/virperf.h +++ b/src/util/virperf.h @@ -19,7 +19,6 @@ #pragma once =20 #include "virutil.h" -#include "virautoclean.h" #include "virenum.h" =20 /* Some Intel processor families introduced some RDT (Resource Director diff --git a/src/util/virscsi.h b/src/util/virscsi.h index 3a92366efc..51627e0c05 100644 --- a/src/util/virscsi.h +++ b/src/util/virscsi.h @@ -22,7 +22,6 @@ =20 #include "internal.h" #include "virobject.h" -#include "virautoclean.h" =20 typedef struct _virSCSIDevice virSCSIDevice; typedef virSCSIDevice *virSCSIDevicePtr; diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h index d3185b14bc..a5296890cd 100644 --- a/src/util/virscsivhost.h +++ b/src/util/virscsivhost.h @@ -23,7 +23,6 @@ #include "internal.h" #include "virobject.h" #include "virutil.h" -#include "virautoclean.h" =20 typedef struct _virSCSIVHostDevice virSCSIVHostDevice; typedef virSCSIVHostDevice *virSCSIVHostDevicePtr; diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h index 6cdf7b7c4f..1180864f06 100644 --- a/src/util/virsocketaddr.h +++ b/src/util/virsocketaddr.h @@ -25,7 +25,6 @@ #endif =20 #include "internal.h" -#include "virautoclean.h" =20 /* On architectures which lack these limits, define them (ie. Cygwin). * Note that the libvirt code should be robust enough to handle the diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 545e60ba00..c357803e50 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -29,7 +29,6 @@ #include "virstorageencryption.h" #include "virutil.h" #include "virsecret.h" -#include "virautoclean.h" #include "virenum.h" =20 /* Minimum header size required to probe all known formats with diff --git a/src/util/virsystemd.h b/src/util/virsystemd.h index fcdf6d17fe..dfea75948b 100644 --- a/src/util/virsystemd.h +++ b/src/util/virsystemd.h @@ -22,7 +22,6 @@ #pragma once =20 #include "internal.h" -#include "virautoclean.h" =20 typedef struct _virSystemdActivation virSystemdActivation; typedef virSystemdActivation *virSystemdActivationPtr; diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h index 42a4da466e..ea48ee5009 100644 --- a/src/util/virtypedparam.h +++ b/src/util/virtypedparam.h @@ -24,7 +24,6 @@ #include "internal.h" #include "virutil.h" #include "virenum.h" -#include "virautoclean.h" =20 /** * VIR_TYPED_PARAM_MULTIPLE: diff --git a/src/util/viruri.h b/src/util/viruri.h index f91debefe9..b7f845f41f 100644 --- a/src/util/viruri.h +++ b/src/util/viruri.h @@ -24,7 +24,6 @@ =20 #include "internal.h" #include "virconf.h" -#include "virautoclean.h" =20 typedef struct _virURI virURI; typedef virURI *virURIPtr; diff --git a/src/util/virusb.h b/src/util/virusb.h index 7ff1d55c9e..42a3303952 100644 --- a/src/util/virusb.h +++ b/src/util/virusb.h @@ -22,7 +22,6 @@ =20 #include "internal.h" #include "virobject.h" -#include "virautoclean.h" =20 #define USB_DEVFS "/dev/bus/usb/" =20 diff --git a/src/util/virxml.h b/src/util/virxml.h index 283c592b2c..dfdc1f73c3 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -28,7 +28,6 @@ #include =20 #include "virbuffer.h" -#include "virautoclean.h" =20 xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml) G_GNUC_WARN_UNUSED_RESULT; diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index f6d7f3623c..8e213ec921 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -23,7 +23,6 @@ #include "qemu/qemu_conf.h" #include "qemu/qemu_monitor.h" #include "qemu/qemu_agent.h" -#include "virautoclean.h" =20 typedef struct _qemuMonitorTest qemuMonitorTest; typedef qemuMonitorTest *qemuMonitorTestPtr; --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list