[librsvg: 3/9] Document the LIBRSVG_*_VERSION macros




commit 97184e3e66a04c59ae303d547d63f956af07c510
Author: Federico Mena Quintero <federico gnome org>
Date:   Fri Sep 18 11:34:27 2020 -0500

    Document the LIBRSVG_*_VERSION macros
    
    Note the difference between compile-time checks for the
    version (usable from C/C++ only), and run-time checks for the linked version.

 librsvg/librsvg-features.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
---
diff --git a/librsvg/librsvg-features.c b/librsvg/librsvg-features.c
index 1d25611c..165c4e53 100644
--- a/librsvg/librsvg-features.c
+++ b/librsvg/librsvg-features.c
@@ -1,5 +1,86 @@
 #include "rsvg.h"
 
+/**
+ * LIBRSVG_MAJOR_VERSION:
+ *
+ * This is a C macro that expands to a number with the major version
+ * of librsvg against which your program is compiled.
+ *
+ * For example, for librsvg-2.3.4, the major version is 2.
+ *
+ * C programs can use this as a compile-time check for the required
+ * version, but note that generally it is a better idea to do
+ * compile-time checks by calling <ulink
+ * url="https://www.freedesktop.org/wiki/Software/pkg-config/";>pkg-config</ulink>
+ * in your build scripts.
+ *
+ * Note: for a run-time check on the version of librsvg that your
+ * program is running with (e.g. the version which the linker used for
+ * your program), or for programs not written in C, use
+ * @rsvg_major_version instead.
+ */
+
+/**
+ * LIBRSVG_MINOR_VERSION:
+ *
+ * This is a C macro that expands to a number with the minor version
+ * of librsvg against which your program is compiled.
+ *
+ * For example, for librsvg-2.3.4, the minor version is 3.
+ *
+ * C programs can use this as a compile-time check for the required
+ * version, but note that generally it is a better idea to do
+ * compile-time checks by calling <ulink
+ * url="https://www.freedesktop.org/wiki/Software/pkg-config/";>pkg-config</ulink>
+ * in your build scripts.
+ *
+ * Note: for a run-time check on the version of librsvg that your
+ * program is running with (e.g. the version which the linker used for
+ * your program), or for programs not written in C, use
+ * @rsvg_minor_version instead.
+ */
+
+/**
+ * LIBRSVG_MICRO_VERSION:
+ *
+ * This is a C macro that expands to a number with the micro version
+ * of librsvg against which your program is compiled.
+ *
+ * For example, for librsvg-2.3.4, the micro version is 4.
+ *
+ * C programs can use this as a compile-time check for the required
+ * version, but note that generally it is a better idea to do
+ * compile-time checks by calling <ulink
+ * url="https://www.freedesktop.org/wiki/Software/pkg-config/";>pkg-config</ulink>
+ * in your build scripts.
+ *
+ * Note: for a run-time check on the version of librsvg that your
+ * program is running with (e.g. the version which the linker used for
+ * your program), or for programs not written in C, use
+ * @rsvg_micro_version instead.
+ */
+
+/**
+ * LIBRSVG_VERSION:
+ *
+ * This is a C macro that expands to a string with the version of
+ * librsvg against which your program is compiled.
+ *
+ * For example, for librsvg-2.3.4, this macro expands to
+ * <literal>"2.3.4"</literal>.
+ *
+ * C programs can use this as a compile-time check for the required
+ * version, but note that generally it is a better idea to do
+ * compile-time checks by calling <ulink
+ * url="https://www.freedesktop.org/wiki/Software/pkg-config/";>pkg-config</ulink>
+ * in your build scripts.
+ *
+ * Note: for a run-time check on the version of librsvg that your
+ * program is running with (e.g. the version which the linker used for
+ * your program), or for programs not written in C, use
+ * @rsvg_version instead.
+ */
+
 /**
  * rsvg_major_version:
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]