[libvirt PATCH 1/4] docs: coding-style: Clarify on virXXXPtr types
Ján Tomko
jtomko at redhat.com
Fri Jan 14 15:43:58 UTC 2022
On a Friday in 2022, Tim Wiederhake wrote:
>Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
>---
> docs/coding-style.rst | 5 +++++
> 1 file changed, 5 insertions(+)
>
>diff --git a/docs/coding-style.rst b/docs/coding-style.rst
>index 470c61860f..dca9de1915 100644
>--- a/docs/coding-style.rst
>+++ b/docs/coding-style.rst
>@@ -54,6 +54,7 @@ Struct type names
> and each following word should have its first letter in
> uppercase. The struct name should be the same as the typedef
> name with a leading underscore.
>+
> ::
>
> typedef struct _virHashTable virHashTable;
>@@ -61,6 +62,10 @@ Struct type names
> ...
> };
>
>+ Historically, libvirt declared pointer types 'virXXXPtr' for
>+ both public and internal types. Do not introduce new such
>+ typedefs for internal types.
>+
This weakly suggests that they should be introduced for new public
types. I have no preference, but I think we should mention it here
if we're mentioning internal types.
Jano
> Function names
> All functions should have a 'vir' prefix in their name,
> followed by one or more words with first letter of each word
>--
>2.31.1
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20220114/9843423f/attachment-0001.sig>
More information about the libvir-list
mailing list