mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 23:46:15 +01:00
Merge branch '3037-update-macros-docs' into 'main'
docs: Add a section on version checking macros See merge request GNOME/glib!3758
This commit is contained in:
commit
38b2bffd5e
@ -868,3 +868,29 @@ by application programmers.
|
|||||||
: A macro that should be defined before including the `glib.h` header.
|
: A macro that should be defined before including the `glib.h` header.
|
||||||
If it is defined, no compiler warnings will be produced for uses
|
If it is defined, no compiler warnings will be produced for uses
|
||||||
of deprecated GLib APIs.
|
of deprecated GLib APIs.
|
||||||
|
|
||||||
|
|
||||||
|
## Version checking
|
||||||
|
|
||||||
|
`GLIB_MAJOR_VERSION`
|
||||||
|
|
||||||
|
: A macro that evaluates to the major component of the version of GLib,
|
||||||
|
e.g. `1` for version `1.2.3`.
|
||||||
|
|
||||||
|
|
||||||
|
`GLIB_MINOR_VERSION`
|
||||||
|
|
||||||
|
: A macro that evaluates to the minor component of the version of GLib,
|
||||||
|
e.g. `2` for version `1.2.3`.
|
||||||
|
|
||||||
|
|
||||||
|
`GLIB_MICRO_VERSION`
|
||||||
|
|
||||||
|
: A macro that evaluates to the micro component of the version of GLib,
|
||||||
|
e.g. `3` for version `1.2.3`.
|
||||||
|
|
||||||
|
|
||||||
|
`GLIB_CHECK_VERSION (major, minor, micro)`
|
||||||
|
|
||||||
|
: A macro that evaluates to true if the version of GLib is newer than
|
||||||
|
the given version tuple.
|
||||||
|
Loading…
Reference in New Issue
Block a user