gi: Support caller-allocates GValue arguments
When we were handling a GValue caller-allocates argument we actually were changing a new temporary GArgument copy that we actually didn't end up passing to the function that was changing it.
To ensure that this doesn't happen:
- When a caller-allocates argument is passed to a function, use the actual GIArgument pointer and not deference it.
- Include an argument flag that can be used at conversion time to make clear that we're working on the actual caller allocated argument and not in a gjs copy of it.
- When converting a JSValue to GValue, act on the caller allocated (possibly by arg-cache) memory, instead of setting a new GValue.
As per this we can enable the
This doesn't seem enough to fix #74 (closed) testcase though as the gtk introspection doesn't give us enough information about being caller-allocated.
iwyu seems confused by a required include...