Revert "GValue – Don't cast G_VALUE_TYPE() argument to GValue*"

After building a test run of all GNOME modules against this, we can
conclude that it is a visible API break: it breaks the NetworkManager
build.

http://build.gnome.org/continuous/buildmaster/builds/2018/02/08/46/build/log-NetworkManager.txt

NetworkManager is (almost legitimately) passing a gpointer to
G_VALUE_TYPE, which I think is a use case we should continue supporting.

This reverts commit a05a21bec2f09a7454aea27a0f8aa4739b686878.

https://bugzilla.gnome.org/show_bug.cgi?id=793186
This commit is contained in:
Philip Withnall 2018-02-08 14:28:32 +00:00
parent 76df8cba85
commit ca95aa7e12

View File

@ -56,7 +56,7 @@ G_BEGIN_DECLS
*
* Returns: the #GType.
*/
#define G_VALUE_TYPE(value) (((value))->g_type)
#define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
/**
* G_VALUE_TYPE_NAME:
* @value: A #GValue structure.