diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 3a921946021c7de234c68165b573340600aace2e..b5c322fd9084b5298e08f2065e821426e4b60f8e 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -236,4 +236,4 @@ int virDomainCapsDeviceDefValidate(virDomainCapsPtr const caps, void virSEVCapabilitiesFree(virSEVCapability *capabilities); -VIR_DEFINE_AUTOPTR_FUNC(virSEVCapability, virSEVCapabilitiesFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSEVCapability, virSEVCapabilitiesFree); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e2edca149a9983393ce0344373ee2ff0b662cc59..edac6250e4bbae2b15928b0bc33fafbd07437475 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2913,7 +2913,7 @@ bool virDomainDefHasDeviceAddress(virDomainDefPtr def, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; void virDomainDefFree(virDomainDefPtr vm); -VIR_DEFINE_AUTOPTR_FUNC(virDomainDef, virDomainDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainDef, virDomainDefFree); virDomainChrSourceDefPtr virDomainChrSourceDefNew(virDomainXMLOptionPtr xmlopt); diff --git a/src/conf/secret_conf.h b/src/conf/secret_conf.h index 7cfcfc8a604575135360ee78fad10258d64a85bf..ac94751ef34418a20d9f205ab62c940c3a08aca9 100644 --- a/src/conf/secret_conf.h +++ b/src/conf/secret_conf.h @@ -35,7 +35,7 @@ struct _virSecretDef { }; void virSecretDefFree(virSecretDefPtr def); -VIR_DEFINE_AUTOPTR_FUNC(virSecretDef, virSecretDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSecretDef, virSecretDefFree); virSecretDefPtr virSecretDefParseString(const char *xml); virSecretDefPtr virSecretDefParseFile(const char *filename); diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 1f62803a9d3cdc9ef33ef7d5f1a38aea6305be80..b172e82ccbde2cf50c597dffc14dc1c76be729ca 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -478,6 +478,6 @@ VIR_ENUM_DECL(virStoragePartedFs); VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_AUTOSTART | \ VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_POOL_TYPE) -VIR_DEFINE_AUTOPTR_FUNC(virStoragePoolSource, virStoragePoolSourceFree); -VIR_DEFINE_AUTOPTR_FUNC(virStoragePoolDef, virStoragePoolDefFree); -VIR_DEFINE_AUTOPTR_FUNC(virStorageVolDef, virStorageVolDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStoragePoolSource, virStoragePoolSourceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStoragePoolDef, virStoragePoolDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageVolDef, virStorageVolDefFree); diff --git a/src/conf/virnetworkportdef.h b/src/conf/virnetworkportdef.h index 796e269fe08da088f964d8d74bc75818bd0dd1ac..f5ba337fc9d801d8136b31cdd11a5e0d1141ab02 100644 --- a/src/conf/virnetworkportdef.h +++ b/src/conf/virnetworkportdef.h @@ -82,7 +82,7 @@ struct _virNetworkPortDef { void virNetworkPortDefFree(virNetworkPortDefPtr port); -VIR_DEFINE_AUTOPTR_FUNC(virNetworkPortDef, virNetworkPortDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetworkPortDef, virNetworkPortDefFree); virNetworkPortDefPtr virNetworkPortDefParseNode(xmlDocPtr xml, diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index 17e2ccc98ffb03e4f905574941acc07bb45f28fe..9a13351d2f1e12946b353626d9b735a156052a92 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -87,7 +87,7 @@ qemuBlockNodeNameBackingChainDataFree(qemuBlockNodeNameBackingChainDataPtr data) VIR_FREE(data); } -VIR_DEFINE_AUTOPTR_FUNC(qemuBlockNodeNameBackingChainData, +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockNodeNameBackingChainData, qemuBlockNodeNameBackingChainDataFree); diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index 87525af1607360427688b403aebb0fbc0f05e288..be39c9b4726c386cef7a673646923a1caa592623 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -104,7 +104,7 @@ struct qemuBlockStorageSourceAttachData { void qemuBlockStorageSourceAttachDataFree(qemuBlockStorageSourceAttachDataPtr data); -VIR_DEFINE_AUTOPTR_FUNC(qemuBlockStorageSourceAttachData, +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceAttachData, qemuBlockStorageSourceAttachDataFree); qemuBlockStorageSourceAttachDataPtr @@ -156,7 +156,7 @@ qemuBlockStorageSourceChainDetach(qemuMonitorPtr mon, qemuBlockStorageSourceChainDataPtr data); -VIR_DEFINE_AUTOPTR_FUNC(qemuBlockStorageSourceChainData, +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuBlockStorageSourceChainData, qemuBlockStorageSourceChainDataFree); int diff --git a/src/qemu/qemu_dbus.h b/src/qemu/qemu_dbus.h index 48ea71f7aa3addbd4fa31e2b062aec4068e52134..ccbeb83709725fee5b2e327c7e200a3b3881c6c3 100644 --- a/src/qemu/qemu_dbus.h +++ b/src/qemu/qemu_dbus.h @@ -39,4 +39,4 @@ int qemuDBusVMStateAdd(virQEMUDriverPtr driver, virDomainObjPtr vm, void qemuDBusVMStateRemove(virQEMUDriverPtr driver, virDomainObjPtr vm, const char *id, bool hot); -VIR_DEFINE_AUTOPTR_FUNC(qemuDBusVMState, qemuDBusVMStateFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuDBusVMState, qemuDBusVMStateFree); diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index d043b46e6ce57191ee21ab2a514069e864586a68..10644a0e28ac470f7571b8067f24a825ff6867f4 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -186,7 +186,7 @@ qemuFirmwareOSInterfaceFree(qemuFirmwareOSInterface *interfaces) } -VIR_DEFINE_AUTOPTR_FUNC(qemuFirmwareOSInterface, qemuFirmwareOSInterfaceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareOSInterface, qemuFirmwareOSInterfaceFree); static void @@ -251,7 +251,7 @@ qemuFirmwareTargetFree(qemuFirmwareTargetPtr target) } -VIR_DEFINE_AUTOPTR_FUNC(qemuFirmwareTarget, qemuFirmwareTargetFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareTarget, qemuFirmwareTargetFree); static void @@ -261,7 +261,7 @@ qemuFirmwareFeatureFree(qemuFirmwareFeature *features) } -VIR_DEFINE_AUTOPTR_FUNC(qemuFirmwareFeature, qemuFirmwareFeatureFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmwareFeature, qemuFirmwareFeatureFree); void diff --git a/src/qemu/qemu_firmware.h b/src/qemu/qemu_firmware.h index 28e8322ec9223ac9702ef2a8f9da203265b3932f..10b8eb822bb9d61ff2f3d9e971daf96c51adc860 100644 --- a/src/qemu/qemu_firmware.h +++ b/src/qemu/qemu_firmware.h @@ -32,7 +32,7 @@ typedef qemuFirmware *qemuFirmwarePtr; void qemuFirmwareFree(qemuFirmwarePtr fw); -VIR_DEFINE_AUTOPTR_FUNC(qemuFirmware, qemuFirmwareFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuFirmware, qemuFirmwareFree); qemuFirmwarePtr qemuFirmwareParse(const char *path); diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h index 6f5080e6a75d4854b26af91190a477b0d0564bc3..e8380e6fb177d6dd204eee76dacd6872f21efb11 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -93,7 +93,7 @@ qemuMigrationParamsNew(void); void qemuMigrationParamsFree(qemuMigrationParamsPtr migParams); -VIR_DEFINE_AUTOPTR_FUNC(qemuMigrationParams, qemuMigrationParamsFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMigrationParams, qemuMigrationParamsFree); int qemuMigrationParamsApply(virQEMUDriverPtr driver, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 536ba7893bebdf6fd9d92e420b4c4ba98801cee8..11048dc76ad79aaf2e6ce84e8c5b703eab3965dd 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1343,7 +1343,7 @@ int qemuMonitorGetCurrentMachineInfo(qemuMonitorPtr mon, qemuMonitorCurrentMachineInfoPtr info); void qemuMonitorJobInfoFree(qemuMonitorJobInfoPtr job); -VIR_DEFINE_AUTOPTR_FUNC(qemuMonitorJobInfo, qemuMonitorJobInfoFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorJobInfo, qemuMonitorJobInfoFree); int qemuMonitorGetJobInfo(qemuMonitorPtr mon, qemuMonitorJobInfoPtr **jobs, diff --git a/src/qemu/qemu_slirp.h b/src/qemu/qemu_slirp.h index cda1ed7777c66b7574cd7dbfcd7a932e46fee4ea..5e80e79b153789def26368f58ffefb061508e2c1 100644 --- a/src/qemu/qemu_slirp.h +++ b/src/qemu/qemu_slirp.h @@ -77,4 +77,4 @@ void qemuSlirpStop(qemuSlirpPtr slirp, int qemuSlirpGetFD(qemuSlirpPtr slirp); -VIR_DEFINE_AUTOPTR_FUNC(qemuSlirp, qemuSlirpFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuSlirp, qemuSlirpFree); diff --git a/src/qemu/qemu_vhost_user.c b/src/qemu/qemu_vhost_user.c index d1dbc3bd5c5371eb855e03043382a6f998b5aaf7..8a653fc101e11f35dd8ac16ac8797f75486f6880 100644 --- a/src/qemu/qemu_vhost_user.c +++ b/src/qemu/qemu_vhost_user.c @@ -116,7 +116,7 @@ qemuVhostUserGPUFeatureFree(qemuVhostUserGPUFeature *features) } -VIR_DEFINE_AUTOPTR_FUNC(qemuVhostUserGPUFeature, qemuVhostUserGPUFeatureFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuVhostUserGPUFeature, qemuVhostUserGPUFeatureFree); void diff --git a/src/qemu/qemu_vhost_user.h b/src/qemu/qemu_vhost_user.h index 76701dd1fa54df042e774745be0cffc19e94261e..6bb5f5807c946adf7e7aadd405d07242f295f43f 100644 --- a/src/qemu/qemu_vhost_user.h +++ b/src/qemu/qemu_vhost_user.h @@ -31,7 +31,7 @@ typedef qemuVhostUser *qemuVhostUserPtr; void qemuVhostUserFree(qemuVhostUserPtr fw); -VIR_DEFINE_AUTOPTR_FUNC(qemuVhostUser, qemuVhostUserFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuVhostUser, qemuVhostUserFree); qemuVhostUserPtr qemuVhostUserParse(const char *path); diff --git a/src/util/virauthconfig.h b/src/util/virauthconfig.h index 3de5e36030640e4e877ad6c9d1cb600cc56aeba3..44bef7e2bedd6ea87f3eec57a6a8628351ca904b 100644 --- a/src/util/virauthconfig.h +++ b/src/util/virauthconfig.h @@ -40,4 +40,4 @@ int virAuthConfigLookup(virAuthConfigPtr auth, const char *credname, const char **value); -VIR_DEFINE_AUTOPTR_FUNC(virAuthConfig, virAuthConfigFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virAuthConfig, virAuthConfigFree); diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h index 8d700c88c55c170e076278c11a2663451be49073..e0c5541c13c29de18e3fb710447bd08c785d1576 100644 --- a/src/util/virbitmap.h +++ b/src/util/virbitmap.h @@ -157,4 +157,4 @@ void virBitmapSubtract(virBitmapPtr a, virBitmapPtr b) void virBitmapShrink(virBitmapPtr map, size_t b); -VIR_DEFINE_AUTOPTR_FUNC(virBitmap, virBitmapFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virBitmap, virBitmapFree); diff --git a/src/util/vircommand.h b/src/util/vircommand.h index ed04eb4bd3bf7cf2a3bb2e5612dd4a9c46a7e104..2f39dec1b3375dd627402895855d16324388e646 100644 --- a/src/util/vircommand.h +++ b/src/util/vircommand.h @@ -219,4 +219,4 @@ int virCommandRunNul(virCommandPtr cmd, virCommandRunNulFunc func, void *data); -VIR_DEFINE_AUTOPTR_FUNC(virCommand, virCommandFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCommand, virCommandFree); diff --git a/src/util/virconf.h b/src/util/virconf.h index 4c0c633aad655d4b3d7e0cefdcaa45423383d61a..304b325985833fb33031439905d0a175154a5eba 100644 --- a/src/util/virconf.h +++ b/src/util/virconf.h @@ -81,7 +81,7 @@ virConfPtr virConfReadFile(const char *filename, unsigned int flags); virConfPtr virConfReadString(const char *memory, unsigned int flags); int virConfFree(virConfPtr conf); -VIR_DEFINE_AUTOPTR_FUNC(virConf, virConfFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virConf, virConfFree); void virConfFreeValue(virConfValuePtr val); virConfValuePtr virConfGetValue(virConfPtr conf, const char *setting); diff --git a/src/util/virerror.h b/src/util/virerror.h index e3a08982b31b261b9da90fc44eb85b4736f653b0..7e5ed29ae29aa2127485b627715027edd8765002 100644 --- a/src/util/virerror.h +++ b/src/util/virerror.h @@ -209,4 +209,4 @@ void virErrorRestore(virErrorPtr *savederr); void virLastErrorPrefixMessage(const char *fmt, ...) G_GNUC_PRINTF(1, 2); -VIR_DEFINE_AUTOPTR_FUNC(virError, virFreeError); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virError, virFreeError); diff --git a/src/util/virfile.h b/src/util/virfile.h index a60b2bef9aba6da31113e6d2c4cb5086a085228a..b8256a96b3b16b7bb5530e23c722bf17873dab08 100644 --- a/src/util/virfile.h +++ b/src/util/virfile.h @@ -378,7 +378,7 @@ int virFileInData(int fd, int *inData, long long *length); -VIR_DEFINE_AUTOPTR_FUNC(virFileWrapperFd, virFileWrapperFdFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFileWrapperFd, virFileWrapperFdFree); int virFileGetXAttr(const char *path, const char *name, diff --git a/src/util/virfirewall.h b/src/util/virfirewall.h index 56e78a067224f699779415fec9ab926cf2770d34..bcc1437b9a6c33ccad10edea231779d58cb14ccf 100644 --- a/src/util/virfirewall.h +++ b/src/util/virfirewall.h @@ -114,4 +114,4 @@ int virFirewallApply(virFirewallPtr firewall); void virFirewallSetLockOverride(bool avoid); -VIR_DEFINE_AUTOPTR_FUNC(virFirewall, virFirewallFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFirewall, virFirewallFree); diff --git a/src/util/virfirmware.h b/src/util/virfirmware.h index 30bcd21fa405042b0d8a36d4778e0ad80cd0142a..20bb85050080605bc11243fad3671bfd03edb3d7 100644 --- a/src/util/virfirmware.h +++ b/src/util/virfirmware.h @@ -34,7 +34,7 @@ struct _virFirmware { void virFirmwareFree(virFirmwarePtr firmware); -VIR_DEFINE_AUTOPTR_FUNC(virFirmware, virFirmwareFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virFirmware, virFirmwareFree); void virFirmwareFreeList(virFirmwarePtr *firmwares, size_t nfirmwares); diff --git a/src/util/virhash.h b/src/util/virhash.h index ed3774e693b8a4875b53ecf08476478e9def5374..5bb59376af76edcb4fa68abf0487e2d956b243e0 100644 --- a/src/util/virhash.h +++ b/src/util/virhash.h @@ -195,4 +195,4 @@ void *virHashSearch(const virHashTable *table, virHashSearcher iter, /* Convenience for when VIR_FREE(value) is sufficient as a data freer. */ void virHashValueFree(void *value, const void *name); -VIR_DEFINE_AUTOPTR_FUNC(virHashTable, virHashFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virHashTable, virHashFree); diff --git a/src/util/virjson.h b/src/util/virjson.h index b1d0d0e741c907f03ddb6ccdafbb8fa14ddddd4e..1ce7b75e3ba155c0152036b28bc90e3c5b35cb3f 100644 --- a/src/util/virjson.h +++ b/src/util/virjson.h @@ -163,4 +163,4 @@ char *virJSONStringReformat(const char *jsonstr, bool pretty); virJSONValuePtr virJSONValueObjectDeflatten(virJSONValuePtr json); -VIR_DEFINE_AUTOPTR_FUNC(virJSONValue, virJSONValueFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virJSONValue, virJSONValueFree); diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h index 843893d759326bfb1aedbd082578880eaa9815ec..2fda2b023915e12e21000bda3079c36295770e20 100644 --- a/src/util/virmacaddr.h +++ b/src/util/virmacaddr.h @@ -63,4 +63,4 @@ bool virMacAddrIsMulticast(const virMacAddr *addr); bool virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_BUFLEN]); void virMacAddrFree(virMacAddrPtr addr); -VIR_DEFINE_AUTOPTR_FUNC(virMacAddr, virMacAddrFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virMacAddr, virMacAddrFree); diff --git a/src/util/virmdev.h b/src/util/virmdev.h index 7f442b571f7af120f17f2023c9a46b0ea292e4e6..2f73b1a53071db3edd332030b8c50fe141a0cfe5 100644 --- a/src/util/virmdev.h +++ b/src/util/virmdev.h @@ -140,5 +140,5 @@ int virMediatedDeviceTypeReadAttrs(const char *sysfspath, virMediatedDeviceTypePtr *type); -VIR_DEFINE_AUTOPTR_FUNC(virMediatedDevice, virMediatedDeviceFree); -VIR_DEFINE_AUTOPTR_FUNC(virMediatedDeviceType, virMediatedDeviceTypeFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virMediatedDevice, virMediatedDeviceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virMediatedDeviceType, virMediatedDeviceTypeFree); diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index 894ae86a169d8139014ae90a41f7b0bab8ef053a..e23061dd4c0d672bef9c342d997d90c5698b7d91 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -122,7 +122,7 @@ virNetDevMcastEntryFree(virNetDevMcastEntryPtr entry) VIR_FREE(entry); } -VIR_DEFINE_AUTOPTR_FUNC(virNetDevMcastEntry, virNetDevMcastEntryFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevMcastEntry, virNetDevMcastEntryFree); typedef struct _virNetDevMcastList virNetDevMcastList; typedef virNetDevMcastList *virNetDevMcastListPtr; diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h index 854fddfe779033a370c2b9b4374c49c761f6b262..ea3779bb9881ffed5db9ddb421c42ccda23f2523 100644 --- a/src/util/virnetdev.h +++ b/src/util/virnetdev.h @@ -311,4 +311,4 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link, int virNetDevRunEthernetScript(const char *ifname, const char *script) G_GNUC_NO_INLINE; -VIR_DEFINE_AUTOPTR_FUNC(virNetDevRxFilter, virNetDevRxFilterFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevRxFilter, virNetDevRxFilterFree); diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h index 7af94a49d7a1b7ac62b055317edf50dd6b21140c..59d2d4a04488f6d554a7cb3b58892b1d0eb35124 100644 --- a/src/util/virnetdevip.h +++ b/src/util/virnetdevip.h @@ -94,5 +94,5 @@ void virNetDevIPInfoClear(virNetDevIPInfoPtr ip); int virNetDevIPInfoAddToDev(const char *ifname, virNetDevIPInfo const *ipInfo); -VIR_DEFINE_AUTOPTR_FUNC(virNetDevIPAddr, virNetDevIPAddrFree); -VIR_DEFINE_AUTOPTR_FUNC(virNetDevIPRoute, virNetDevIPRouteFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevIPAddr, virNetDevIPAddrFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevIPRoute, virNetDevIPRouteFree); diff --git a/src/util/virnetdevvlan.h b/src/util/virnetdevvlan.h index 87d361a1cf7625f7e818e4e5327327d1b8c823ae..0e4fd03dcb33e780cb2b35207eed780b6b432ef4 100644 --- a/src/util/virnetdevvlan.h +++ b/src/util/virnetdevvlan.h @@ -48,4 +48,4 @@ void virNetDevVlanFree(virNetDevVlanPtr vlan); int virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b); int virNetDevVlanCopy(virNetDevVlanPtr dst, const virNetDevVlan *src); -VIR_DEFINE_AUTOPTR_FUNC(virNetDevVlan, virNetDevVlanFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevVlan, virNetDevVlanFree); diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 901e04845c3e25e072406aa34b53beaa32c721cf..34c3f28087b4a4851af1f43b3f9d86ef33146bba 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -64,7 +64,7 @@ typedef struct nl_handle virNetlinkHandle; typedef struct nl_sock virNetlinkHandle; # endif -VIR_DEFINE_AUTOPTR_FUNC(virNetlinkHandle, virNetlinkFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkHandle, virNetlinkFree); typedef struct _virNetlinkEventSrvPrivate virNetlinkEventSrvPrivate; typedef virNetlinkEventSrvPrivate *virNetlinkEventSrvPrivatePtr; diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index a7e455769d31aa80b7dab8d0f535134334c8fc53..5cb6060b3b07260df0b2f62607938d9e60920096 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -36,7 +36,7 @@ # endif typedef struct nl_msg virNetlinkMsg; -VIR_DEFINE_AUTOPTR_FUNC(virNetlinkMsg, nlmsg_free); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetlinkMsg, nlmsg_free); #else diff --git a/src/util/virpci.h b/src/util/virpci.h index 017545424da7253b52090ab1ed59cb8a7c1f5a70..4ffe5db2d65131faeecd1409c6b1be0e3fe6f7b3 100644 --- a/src/util/virpci.h +++ b/src/util/virpci.h @@ -274,6 +274,6 @@ ssize_t virPCIGetMdevTypes(const char *sysfspath, void virPCIDeviceAddressFree(virPCIDeviceAddressPtr address); -VIR_DEFINE_AUTOPTR_FUNC(virPCIDevice, virPCIDeviceFree); -VIR_DEFINE_AUTOPTR_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree); -VIR_DEFINE_AUTOPTR_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIDevice, virPCIDeviceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIDeviceAddress, virPCIDeviceAddressFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPCIEDeviceInfo, virPCIEDeviceInfoFree); diff --git a/src/util/virperf.h b/src/util/virperf.h index 27d04b3ea43781f53ecbe5aa21560f55d6a93b21..df990109b1105e2a2df29b29d812b1b47b62f3ed 100644 --- a/src/util/virperf.h +++ b/src/util/virperf.h @@ -82,4 +82,4 @@ int virPerfReadEvent(virPerfPtr perf, virPerfEventType type, uint64_t *value); -VIR_DEFINE_AUTOPTR_FUNC(virPerf, virPerfFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virPerf, virPerfFree); diff --git a/src/util/virscsi.c b/src/util/virscsi.c index d2c68644fa05400aac0986578eccf50918c320ac..5cae15afd2c1df0e245d1639a3da19a4f8c43067 100644 --- a/src/util/virscsi.c +++ b/src/util/virscsi.c @@ -249,7 +249,7 @@ virSCSIDeviceUsedByInfoFree(virUsedByInfoPtr used_by) VIR_FREE(used_by->domname); VIR_FREE(used_by); } -VIR_DEFINE_AUTOPTR_FUNC(virUsedByInfo, virSCSIDeviceUsedByInfoFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virUsedByInfo, virSCSIDeviceUsedByInfoFree); void virSCSIDeviceFree(virSCSIDevicePtr dev) diff --git a/src/util/virscsi.h b/src/util/virscsi.h index cfd6ac735610adab53af954e82b0500b8efe2b51..3a92366efcbdbf591039fcc7f3f518f0c2ad9e31 100644 --- a/src/util/virscsi.h +++ b/src/util/virscsi.h @@ -95,4 +95,4 @@ void virSCSIDeviceListDel(virSCSIDeviceListPtr list, virSCSIDevicePtr virSCSIDeviceListFind(virSCSIDeviceListPtr list, virSCSIDevicePtr dev); -VIR_DEFINE_AUTOPTR_FUNC(virSCSIDevice, virSCSIDeviceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSCSIDevice, virSCSIDeviceFree); diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h index 52f5d2c33fc22c6706f750ba61ff6c5e73d732ef..d3185b14bc43d0aa622932e8898c6d49d629ad40 100644 --- a/src/util/virscsivhost.h +++ b/src/util/virscsivhost.h @@ -63,4 +63,4 @@ void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevicePtr dev, void virSCSIVHostDeviceFree(virSCSIVHostDevicePtr dev); int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_GNUC_NO_INLINE; -VIR_DEFINE_AUTOPTR_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree); diff --git a/src/util/virsocketaddr.h b/src/util/virsocketaddr.h index bb97e6e3a0a4a596693991860b85a1c331bc1b65..6cdf7b7c4f651f45835833bc4e68de5ba51c0561 100644 --- a/src/util/virsocketaddr.h +++ b/src/util/virsocketaddr.h @@ -163,4 +163,4 @@ int virSocketAddrPTRDomain(const virSocketAddr *addr, void virSocketAddrFree(virSocketAddrPtr addr); -VIR_DEFINE_AUTOPTR_FUNC(virSocketAddr, virSocketAddrFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSocketAddr, virSocketAddrFree); diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index cfee047e6f8990654fe44946f901cf79c27adda0..545e60ba007e3b191ad7d9088261166d0392238c 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -552,4 +552,4 @@ void virStorageFileReportBrokenChain(int errcode, virStorageSourcePtr src, virStorageSourcePtr parent); -VIR_DEFINE_AUTOPTR_FUNC(virStorageAuthDef, virStorageAuthDefFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virStorageAuthDef, virStorageAuthDefFree); diff --git a/src/util/virsystemd.h b/src/util/virsystemd.h index 2c0a0d8dc084b0ad85877ef24808c12cb71c7b68..fcdf6d17fe84438190cdc5be50a7d16cb28daf7d 100644 --- a/src/util/virsystemd.h +++ b/src/util/virsystemd.h @@ -84,4 +84,4 @@ void virSystemdActivationClaimFDs(virSystemdActivationPtr act, void virSystemdActivationFree(virSystemdActivationPtr act); -VIR_DEFINE_AUTOPTR_FUNC(virSystemdActivation, virSystemdActivationFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virSystemdActivation, virSystemdActivationFree); diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h index b35f1f93efd4d7026001990106c998b5bb64e29f..42a4da466e91543db1ff97b2d7942d60d8c71f49 100644 --- a/src/util/virtypedparam.h +++ b/src/util/virtypedparam.h @@ -140,7 +140,7 @@ struct _virTypedParamList { }; void virTypedParamListFree(virTypedParamListPtr list); -VIR_DEFINE_AUTOPTR_FUNC(virTypedParamList, virTypedParamListFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virTypedParamList, virTypedParamListFree); size_t virTypedParamListStealParams(virTypedParamListPtr list, virTypedParameterPtr *params); diff --git a/src/util/viruri.h b/src/util/viruri.h index e988582bbeea246717cb967bc4aca85f4a4caf74..f91debefe90de8cf582915ce7c591138fb5f3a6e 100644 --- a/src/util/viruri.h +++ b/src/util/viruri.h @@ -60,7 +60,7 @@ char *virURIFormat(virURIPtr uri) char *virURIFormatParams(virURIPtr uri); void virURIFree(virURIPtr uri); -VIR_DEFINE_AUTOPTR_FUNC(virURI, virURIFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virURI, virURIFree); int virURIResolveAlias(virConfPtr conf, const char *alias, char **uri); #define VIR_URI_SERVER(uri) ((uri) && (uri)->server ? (uri)->server : "localhost") diff --git a/src/util/virusb.h b/src/util/virusb.h index 33ddb6c84e220003e319a8fb3979d5a5d1133774..7ff1d55c9ed9c93cd9879545b1ab93057c952131 100644 --- a/src/util/virusb.h +++ b/src/util/virusb.h @@ -98,4 +98,4 @@ void virUSBDeviceListDel(virUSBDeviceListPtr list, virUSBDevicePtr virUSBDeviceListFind(virUSBDeviceListPtr list, virUSBDevicePtr dev); -VIR_DEFINE_AUTOPTR_FUNC(virUSBDevice, virUSBDeviceFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virUSBDevice, virUSBDeviceFree); diff --git a/src/util/virxml.h b/src/util/virxml.h index 8813e31f75a15fae9373bd5785f20bc8d7e82046..283c592b2c420ca24b2a3e0f0004d65150923583 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -247,8 +247,8 @@ G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(virXPathContextNodeSave, virXPathContextNodeRes .node = _ctxt->node}; \ ignore_value(&_ctxt ## CtxtSave) -VIR_DEFINE_AUTOPTR_FUNC(xmlDoc, xmlFreeDoc); -VIR_DEFINE_AUTOPTR_FUNC(xmlXPathContext, xmlXPathFreeContext); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlDoc, xmlFreeDoc); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(xmlXPathContext, xmlXPathFreeContext); typedef int (*virXMLNamespaceParse)(xmlXPathContextPtr ctxt, void **nsdata); typedef void (*virXMLNamespaceFree)(void *nsdata); diff --git a/tests/qemumonitortestutils.h b/tests/qemumonitortestutils.h index 2333fceed0138ef6b080fe3b0ae3bf14ced493f9..f6d7f3623c6330cdb6f214830023b22a480b48e5 100644 --- a/tests/qemumonitortestutils.h +++ b/tests/qemumonitortestutils.h @@ -101,4 +101,4 @@ qemuMonitorPtr qemuMonitorTestGetMonitor(qemuMonitorTestPtr test); qemuAgentPtr qemuMonitorTestGetAgent(qemuMonitorTestPtr test); virDomainObjPtr qemuMonitorTestGetDomainObj(qemuMonitorTestPtr test); -VIR_DEFINE_AUTOPTR_FUNC(qemuMonitorTest, qemuMonitorTestFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorTest, qemuMonitorTestFree); diff --git a/tools/virsh-util.h b/tools/virsh-util.h index 955d34dcfc645ba88b5296fd49b026f5e4509949..2b0447268ee0609e7d3e19f706d795072d9d300a 100644 --- a/tools/virsh-util.h +++ b/tools/virsh-util.h @@ -43,7 +43,7 @@ typedef virDomain virshDomain; void virshDomainFree(virDomainPtr dom); -VIR_DEFINE_AUTOPTR_FUNC(virshDomain, virshDomainFree); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virshDomain, virshDomainFree); void virshDomainCheckpointFree(virDomainCheckpointPtr chk);