mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lib: Drop internal virXXXPtr typedefs
Historically, we declared pointer type to our types: typedef struct _virXXX virXXX; typedef virXXX *virXXXPtr; But usefulness of such declaration is questionable, at best. Unfortunately, we can't drop every such declaration - we have to carry some over, because they are part of public API (e.g. virDomainPtr). But for internal types - we can do drop them and use what every other C project uses 'virXXX *'. This change was generated by a very ugly shell script that generated sed script which was then called over each file in the repository. For the shell script refer to the cover letter: https://listman.redhat.com/archives/libvir-list/2021-March/msg00537.html Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
|
||||
# define VIR_FROM_THIS VIR_FROM_LXC
|
||||
|
||||
virCapsPtr
|
||||
virCaps *
|
||||
testLXCCapsInit(void)
|
||||
{
|
||||
virCapsPtr caps;
|
||||
virCapsGuestPtr guest;
|
||||
virCaps *caps;
|
||||
virCapsGuest *guest;
|
||||
|
||||
if ((caps = virCapabilitiesNew(VIR_ARCH_X86_64,
|
||||
false, false)) == NULL)
|
||||
@@ -58,10 +58,10 @@ testLXCCapsInit(void)
|
||||
}
|
||||
|
||||
|
||||
virLXCDriverPtr
|
||||
virLXCDriver *
|
||||
testLXCDriverInit(void)
|
||||
{
|
||||
virLXCDriverPtr driver = g_new0(virLXCDriver, 1);
|
||||
virLXCDriver *driver = g_new0(virLXCDriver, 1);
|
||||
|
||||
if (virMutexInit(&driver->lock) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
@@ -78,7 +78,7 @@ testLXCDriverInit(void)
|
||||
|
||||
|
||||
void
|
||||
testLXCDriverFree(virLXCDriverPtr driver)
|
||||
testLXCDriverFree(virLXCDriver *driver)
|
||||
{
|
||||
virObjectUnref(driver->xmlopt);
|
||||
virObjectUnref(driver->caps);
|
||||
|
||||
Reference in New Issue
Block a user