Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 392
    • Issues 392
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Merge requests
  • !374

slight re-design of the FFI interface to support nested data-structures in general and structs in particular; resolves bug #2459

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Sven-Bodo Scholz requested to merge sbs/sac2c:FFI-structs into develop Apr 03, 2025
  • Overview 1
  • Commits 18
  • Changes 20

T_sacarg is now similar to T_hidden in that it carries information about the "nested type". SACarg(MAIN::struct_A) now represents a legal type. Whenever we go to the FFI interface, we hand over SACarg(---) types.

DSS replaces all SACarg(MAIN::struct_A) types by their components, but leaves SACarg(---) type intact.

With this MR, sac2c and sac4c should at least work. However, to actually pass structs between C and SaC some more work is needed in generate_generic_type_conversions.c. While only relatively little more implementation is needed (see TODOs in BuildUnwrapBody and in BuildWrapBody), I expect some more work on the debugging front as these functions create SACarg(---) from SACarg(MAIN::struct_A)[.] types.....

Along with some more cleanup in sacarginterface.c this could come in a later MR.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: FFI-structs