Fix C extraction of arguments passed by reference.
Ideally, the logic of boxed structs should have been reused, but since ref
is a polymorphic type, we have to hardcode its handling and duplicate the logic. For now, the mechanism is only for ref
, but it could be extended to any record with a single mutable field (not counting ghost fields).
Only accesses through x.contents
are properly handled. There is still work to do for functions of ref.Ref
, as a driver version leads to ugly *&x
constructs.