]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
docstring: variable: Move docstring from source to header file
authorVictor Toso <victortoso@redhat.com>
Wed, 20 Apr 2022 19:07:53 +0000 (21:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 22 Apr 2022 07:45:00 +0000 (09:45 +0200)
virConnectAuthPtrDefault is the only variable that we export and
with the documentation being at the C file, it makes harder to find
it.

With this patch, the documentation of this variable can be found by
those who look at the header file for guidance plus, it will also be
included in the XML API, as the followup patch will fix apibuild.py
to store what is documented in the header file for this variable.

Note that the apibuild, does not do the same with .c files. It'd
require adding it for (parsing) recursion, similar to what is done
for functions.  Considering the pros/cons, seems more reasonable to
move the docstring to the header file instead.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
include/libvirt/libvirt-host.h
src/libvirt.c

index 1dc4b8a147b1dc9c01d2f1e35730963464c1bda2..99b34475ea19f11a2789357ea2e20e022f5ff712 100644 (file)
@@ -562,6 +562,18 @@ struct _virConnectAuth {
 typedef struct _virConnectAuth virConnectAuth;
 typedef virConnectAuth *virConnectAuthPtr;
 
+/*
+ * virConnectAuthPtrDefault:
+ *
+ * A default implementation of the authentication callbacks. This
+ * implementation is suitable for command line based tools. It will
+ * prompt for username, passwords, realm and one time keys as needed.
+ * It will print on STDOUT, and read from STDIN. If this is not
+ * suitable for the application's needs an alternative implementation
+ * should be provided.
+ *
+ * Since: v0.4.1
+ */
 VIR_EXPORT_VAR virConnectAuthPtr virConnectAuthPtrDefault;
 
 /**
index 45315f484c97e627a66dabd07b85dcae16f82dd5..6cda75d1ca6a7dd2826c24b633f6a25a01c736c0 100644 (file)
@@ -197,16 +197,7 @@ static virConnectAuth virConnectAuthDefault = {
     NULL,
 };
 
-/*
- * virConnectAuthPtrDefault
- *
- * A default implementation of the authentication callbacks. This
- * implementation is suitable for command line based tools. It will
- * prompt for username, passwords, realm and one time keys as needed.
- * It will print on STDOUT, and read from STDIN. If this is not
- * suitable for the application's needs an alternative implementation
- * should be provided.
- */
+/* Explanation in the header file */
 virConnectAuthPtr virConnectAuthPtrDefault = &virConnectAuthDefault;
 
 static bool virGlobalError;