Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a C test for using a Chapel class instance opaquely #22812

Merged
merged 5 commits into from
Jul 25, 2023

Conversation

riftEmber
Copy link
Member

@riftEmber riftEmber commented Jul 25, 2023

Adds a C test which uses a Chapel library to interact with an instance of a Chapel class ,without any knowledge of the class type. Uses a void* on the C side and casting to/from an unmanaged instance on the Chapel side.

Tests the remaining functionality expected in the example from #22478. Follow up to #22524 which was responsible for another piece.

Resolves https://github.com/Cray/chapel-private/issues/5011.

[test addition, not reviewed]

Testing:

  • new test passes on macOS and chapdl

This was causing a segfault, due to trying to delete the stack address
of the pointer itself.

Signed-off-by: Anna Rift <[email protected]>
@riftEmber riftEmber merged commit 525b482 into chapel-lang:main Jul 25, 2023
7 checks passed
@riftEmber riftEmber deleted the test-cPtr-class-reconstitution branch July 25, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant