Fix GValue roundtripping
In the gobject-introspection test suite we have this test:
/**
* gi_marshalling_tests_gvalue_flat_array_round_trip:
* @one: The first GValue
* @two: The second GValue
* @three: The third GValue
*
* Returns: (array fixed-size=3) (transfer full): a flat array of [@one, @two, @three]
*/
GValue* gi_marshalling_tests_gvalue_flat_array_round_trip (const GValue one, const GValue two, const GValue three);
When executed in JS,
const out = GIMarshallingTests.gvalue_flat_array_round_trip(42, '42', true);
We get the following exception thrown:
Don't know how to convert gtype gchar to Javascript object
It seems like we should adjust the type-guessing when we convert JS values to GValues so that at least the same JS value can later be extracted from the GValue.
Verify the fix by un-disabling the test in testGIMarshalling.js and making sure it passes correctly.