gi: return return value as the first argument of out arguments