diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2017-09-13 19:13:28 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-09-13 19:14:53 +0200 |
commit | ca39b63c68346f019e8aa5ecf2505e645e921532 (patch) | |
tree | 8bdda30161acead876654bcf549a5bb18bc28fe5 /docs/reference/libqmi-glib/Makefile.am | |
parent | ebe371dd93ad9b64804eb6dbebc0bbbb5fe50294 (diff) |
api: don't use intermediate variables for deprecation warnings
Using an intermediate constant variable breaks compilation with C
compilers, as these variables cannot be used as initializers.
Instead, define a deprecated type and cast all deprecated symbols to
that type. We lose the information about what the new replacement
symbol is, but we don't break compilation.
Also, add QMI_DISABLE_DEPRECATED guards around deprecated symbols. So
that when this symbol is defined, e.g. via CFLAGS, building a program
that uses the libmbim API will fail if the program references
deprecated symbols. For now we just use it to keep gtk-doc-scan happy
and avoid unnecessary warnings.
Equivalent to ModemManager commits eedd4ab4457 and f0bb6ef856.
Diffstat (limited to 'docs/reference/libqmi-glib/Makefile.am')
-rw-r--r-- | docs/reference/libqmi-glib/Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/reference/libqmi-glib/Makefile.am b/docs/reference/libqmi-glib/Makefile.am index 9f21396..0e07ce4 100644 --- a/docs/reference/libqmi-glib/Makefile.am +++ b/docs/reference/libqmi-glib/Makefile.am @@ -30,7 +30,7 @@ $(DOC_MODULE)-sections.mstamp: $(ALL_SECTIONS) BUILT_SOURCES = $(DOC_MODULE)-sections.mstamp # Extra options to supply to gtkdoc-scan -SCAN_OPTIONS = --rebuild-types +SCAN_OPTIONS = --rebuild-types --deprecated-guards="QMI_DISABLE_DEPRECATED" # The directory containing the source code. DOC_SOURCE_DIR = \ |