mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
16121a88a7
Converting from virObject to GObject is reasonably straightforward, as illustrated by this patch for virIdentity In the header file - Remove typedef struct _virIdentity virIdentity - Add #define VIR_TYPE_IDENTITY virIdentity_get_type () G_DECLARE_FINAL_TYPE (virIdentity, vir_identity, VIR, IDENTITY, GObject); Which provides the typedef we just removed, and class declaration boilerplate and various other constants/macros. In the source file - Change 'virObject parent' to 'GObject parent' in the struct - Remove the virClass variable and its initializing call - Add G_DEFINE_TYPE(virIdentity, vir_identity, G_TYPE_OBJECT) which declares the instance & class constructor functions - Add an impl of the instance & class constructors wiring up the finalize method to point to our dispose impl In all files - Replace VIR_AUTOUNREF(virIdentityPtr) with g_autoptr(virIdentity) - Replace virObjectRef/Unref with g_object_ref/unref. Note the latter functions do *NOT* accept a NULL object where as libvirt's do. If you replace g_object_unref with g_clear_object it is NULL safe, but also clears the pointer. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> |
||
---|---|---|
.. | ||
virt-acl.m4 | ||
virt-apparmor.m4 | ||
virt-arg.m4 | ||
virt-atomic.m4 | ||
virt-attr.m4 | ||
virt-audit.m4 | ||
virt-bash-completion.m4 | ||
virt-blkid.m4 | ||
virt-capng.m4 | ||
virt-chrdev-lock-files.m4 | ||
virt-compile-pie.m4 | ||
virt-compile-warnings.m4 | ||
virt-curl.m4 | ||
virt-dbus.m4 | ||
virt-debug.m4 | ||
virt-default-editor.m4 | ||
virt-devmapper.m4 | ||
virt-dlopen.m4 | ||
virt-driver-bhyve.m4 | ||
virt-driver-esx.m4 | ||
virt-driver-hyperv.m4 | ||
virt-driver-interface.m4 | ||
virt-driver-libvirtd.m4 | ||
virt-driver-libxl.m4 | ||
virt-driver-lxc.m4 | ||
virt-driver-modules.m4 | ||
virt-driver-network.m4 | ||
virt-driver-openvz.m4 | ||
virt-driver-phyp.m4 | ||
virt-driver-qemu.m4 | ||
virt-driver-remote.m4 | ||
virt-driver-test.m4 | ||
virt-driver-vbox.m4 | ||
virt-driver-vmware.m4 | ||
virt-driver-vz.m4 | ||
virt-dtrace.m4 | ||
virt-external-programs.m4 | ||
virt-firewalld-zone.m4 | ||
virt-firewalld.m4 | ||
virt-fuse.m4 | ||
virt-glib.m4 | ||
virt-gluster.m4 | ||
virt-gnutls.m4 | ||
virt-hal.m4 | ||
virt-host-validate.m4 | ||
virt-init-script.m4 | ||
virt-lib.m4 | ||
virt-libiscsi.m4 | ||
virt-libnl.m4 | ||
virt-libpcap.m4 | ||
virt-libssh.m4 | ||
virt-libxml.m4 | ||
virt-linker-no-indirect.m4 | ||
virt-linker-no-undefined.m4 | ||
virt-linker-relro.m4 | ||
virt-loader-nvram.m4 | ||
virt-login-shell.m4 | ||
virt-macvtap.m4 | ||
virt-netcf.m4 | ||
virt-nls.m4 | ||
virt-nss.m4 | ||
virt-numactl.m4 | ||
virt-numad.m4 | ||
virt-nwfilter.m4 | ||
virt-openwsman.m4 | ||
virt-parted.m4 | ||
virt-pciaccess.m4 | ||
virt-pm-utils.m4 | ||
virt-polkit.m4 | ||
virt-pthread.m4 | ||
virt-readline.m4 | ||
virt-result.m4 | ||
virt-sanlock.m4 | ||
virt-sasl.m4 | ||
virt-secdriver-apparmor.m4 | ||
virt-secdriver-selinux.m4 | ||
virt-selinux.m4 | ||
virt-ssh2.m4 | ||
virt-storage-dir.m4 | ||
virt-storage-disk.m4 | ||
virt-storage-fs.m4 | ||
virt-storage-gluster.m4 | ||
virt-storage-iscsi-direct.m4 | ||
virt-storage-iscsi.m4 | ||
virt-storage-lvm.m4 | ||
virt-storage-mpath.m4 | ||
virt-storage-rbd.m4 | ||
virt-storage-scsi.m4 | ||
virt-storage-sheepdog.m4 | ||
virt-storage-vstorage.m4 | ||
virt-storage-zfs.m4 | ||
virt-sysctl.m4 | ||
virt-tls-priority.m4 | ||
virt-udev.m4 | ||
virt-virtualport.m4 | ||
virt-win-common.m4 | ||
virt-win-cygwin.m4 | ||
virt-win-mingw.m4 | ||
virt-win-symbols.m4 | ||
virt-win-windres.m4 | ||
virt-wireshark.m4 | ||
virt-xdr.m4 | ||
virt-yajl.m4 |