This goes undiagnosed under normal circumstances, but is a critical
warning (which is fatal by default) under G_ENABLE_DIAGNOSTIC. This is a
programming error, so we should only exercise it under
g_test_undefined(), and only in a test that is intentionally doing this
(as in the previous commit).
Signed-off-by: Simon McVittie <smcv@collabora.com>
This function returns the most specific instantiatable type
that is a prerequisite for a given interface.
This type is necessary in particular when dealing with GValues
because a GValue contains an instance of a type.
This commit includes tests for the new API.
This reverts commits:
5899c61ed2b4be3f02d0382d6fb0d1fc1bb7bc98
e994d4535270b233c4ed5c62e0055fe20c9ab1c6
eb20dec144765d255928fb3e0df960b09af5904d
ebec0dd359eb3a3dc5dbf8ac533a7d89cfc72267
which wer accidentally pushed to master instead of a branch
There is (at most) a single GType that is instantiable and a
prerequisite for an interface. This function returns that type.
This type is necessary in particular when dealing with GValues because a
GValue contains an instance of a type.