glib_typeof: It is an API break that should be opt-in

That changes the return type of functions like g_object_ref() that can
break C++ applications like Webkit. Note that it is not an ABI break.

It must thus be opt-in the same way we did when adding this to
g_object_ref() for GNU C compilers in the first place. Unfortunately it
cannot be done directly in gmacros.h because GLIB_VERSION_2_68 is not
defined there, and gversionmacros.h cannot be included there because
there is some strict ordering in which those headers must be included.

This means that applications that does not define
GLIB_VERSION_MIN_REQUIRED will still get an API break, so we encourage
them to declare their minimum requirement to avoir such issues in the
future too.
This commit is contained in:
Xavier Claessens
2020-10-20 11:57:05 -04:00
parent d95885d91e
commit 4273c43902
5 changed files with 6 additions and 4 deletions

View File

@@ -735,6 +735,7 @@ G_ANALYZER_ANALYZING
G_ANALYZER_NORETURN
g_autoptr_cleanup_generic_gfree
glib_typeof
glib_typeof_2_68
g_macro__has_attribute
g_macro__has_builtin
g_macro__has_feature