Mentions légales du service

Skip to content

Fix C extraction of arguments passed by reference.

Guillaume Melquiond requested to merge fix_c_reference into master

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.

Edited by Guillaume Melquiond

Merge request reports