gi: support INOUT argument as input argument