GVariant: use GVariantTypeInfo on internal constructors
authorRyan Lortie <desrt@desrt.ca>
Wed, 3 Dec 2014 07:04:33 +0000 (02:04 -0500)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Fri, 10 Jul 2015 09:47:43 +0000 (11:47 +0200)
commit0a4ee12c7a9dfc82443133dfb2b18fb411d79f48
tree892ef7970d287ca23fc99b57650fa86306d01c33
parent1a3783987be7aa436c4b0789ce019289773d5018
GVariant: use GVariantTypeInfo on internal constructors

Take GVariantTypeInfo instead of a GVariantType on the internal
constructors for GVariant.

Although this results in a bit more code for almost every call, it turns
out that it makes most uses more convenient -- that fact that we consume
the GVariantInfo means that we don't have to go back to free the type
when we're done.

This change will allow us to port g_variant_get_child() over to using
g_variant_alloc().  It was the one outstanding place where we
constructed GVariant instances that was not yet using it.
glib/gvariant-core.c
glib/gvariant-core.h
glib/gvariant.c