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:
Michal Privoznik
2021-03-11 08:16:13 +01:00
parent c21f066d61
commit c8238579fb
734 changed files with 29338 additions and 30231 deletions

View File

@@ -52,7 +52,7 @@ testMdevctlStartOrDefine(const char *virt_type,
const char *jsonfile)
{
g_autoptr(virNodeDeviceDef) def = NULL;
virNodeDeviceObjPtr obj = NULL;
virNodeDeviceObj *obj = NULL;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
const char *actualCmdline = NULL;
int ret = -1;
@@ -270,7 +270,7 @@ testMdevctlParse(const void *data)
}
static void
nodedevTestDriverFree(virNodeDeviceDriverStatePtr drv)
nodedevTestDriverFree(virNodeDeviceDriverState *drv)
{
if (!drv)
return;
@@ -283,10 +283,10 @@ nodedevTestDriverFree(virNodeDeviceDriverStatePtr drv)
}
/* Add a fake root 'computer' device */
static virNodeDeviceDefPtr
static virNodeDeviceDef *
fakeRootDevice(void)
{
virNodeDeviceDefPtr def = NULL;
virNodeDeviceDef *def = NULL;
def = g_new0(virNodeDeviceDef, 1);
def->caps = g_new0(virNodeDevCapsDef, 1);
@@ -299,11 +299,11 @@ fakeRootDevice(void)
* devices. For our purposes, it only needs to have a name that matches the
* parent of the mdev, and it needs a PCI address
*/
static virNodeDeviceDefPtr
static virNodeDeviceDef *
fakeParentDevice(void)
{
virNodeDeviceDefPtr def = NULL;
virNodeDevCapPCIDevPtr pci_dev;
virNodeDeviceDef *def = NULL;
virNodeDevCapPCIDev *pci_dev;
def = g_new0(virNodeDeviceDef, 1);
def->caps = g_new0(virNodeDevCapsDef, 1);
@@ -322,9 +322,9 @@ fakeParentDevice(void)
}
static int
addDevice(virNodeDeviceDefPtr def)
addDevice(virNodeDeviceDef *def)
{
virNodeDeviceObjPtr obj;
virNodeDeviceObj *obj;
if (!def)
return -1;