gi/pygi-value: Don't wrap GValue in GValue when creating GValueArray
commitb5eab39ebcae061a46c186beac47f7e936ce57c2
authorStian Selnes <stian@pexip.com>
Tue, 11 Apr 2017 09:17:31 +0000 (11 11:17 +0200)
committerChristoph Reiter <reiter.christoph@gmail.com>
Fri, 4 May 2018 16:56:04 +0000 (4 18:56 +0200)
tree88fb47c789cc6a3c1596e568e29d9ec5ecb2209a
parent9c671606cc93a06e6db3ee5ee5f0862a7bfc21f9
gi/pygi-value: Don't wrap GValue in GValue when creating GValueArray

If a GValueArray is created from a list of GValues, it should not wrap
these GValues in a second layer of GValues before appending to the
array. The end result should be a GValueArray of GValues, not a
GValueArray of GValues holding another GValue (unless the user
explicitly creates such a value).

With this patch the behavior is now consistent when creating a
GValueArray and appending GValues directly, and creating a GValueArray
within a GValue based on a list of GValues.

For instance, to create a GValueArray of G_TYPE_UINT the user must
create GValues manually and create a GValueArray from these. The result
should be a GValueArray of GValues that hold G_TYPE_UINT, not a
GValueArray that contain GValues that hold a GValue that holds
G_TYPE_UINT.

See !66
gi/pygi-value.c
tests/test_gobject.py
tests/testhelpermodule.c