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

@@ -83,7 +83,7 @@
</p>
<pre>
virCommandPtr cmd = virCommandNew("/usr/bin/dnsmasq");
virCommand *cmd = virCommandNew("/usr/bin/dnsmasq");
</pre>
<p>
@@ -136,7 +136,7 @@ virCommandAddArgList(cmd, "--domain", "localdomain", NULL);
<p>
This can also be done at the time of initial construction of
the <code>virCommandPtr</code> object:
the <code>virCommand *</code> object:
</p>
<pre>
@@ -145,8 +145,8 @@ const char *const args[] = {
"--strict-order", "--except-interface",
"lo", "--domain", "localdomain", NULL
};
virCommandPtr cmd1 = virCommandNewArgs(cmd, args);
virCommandPtr cmd2 = virCommandNewArgList("/usr/bin/dnsmasq",
virCommand *cmd1 = virCommandNewArgs(cmd, args);
virCommand *cmd2 = virCommandNewArgList("/usr/bin/dnsmasq",
"--domain", "localdomain", NULL);
</pre>
@@ -537,7 +537,7 @@ if (WEXITSTATUS(status)...) {
<p>
Once the command has been executed, or if execution
has been abandoned, it is necessary to release
resources associated with the <code>virCommandPtr</code>
resources associated with the <code>virCommand *</code>
object. This is done with:
</p>
@@ -566,7 +566,7 @@ int runhook(const char *drvstr, const char *id,
{
int ret;
char *path;
virCommandPtr cmd;
virCommand *cmd;
virBuildPath(&amp;path, LIBVIRT_HOOK_DIR, drvstr);