Skip to content

Add type for managing pointers to tskit-c types. #448

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

Merged
merged 1 commit into from
Jan 26, 2023

Conversation

molpopgen
Copy link
Member

@molpopgen molpopgen commented Jan 25, 2023

This PR is a WIP to:

  1. Work out a new type in sys.rs to manage pointers to tskit-c types.
  2. Support types that do and do not own the pointed-to data.
    a. The first case means a malloc'd pointer.
    b. The second case means a reference to a pointer owned by
    another object. For example, and edge table owned by a table
    collection.

Related issues:

  1. Reconcile table ownership semantics #439
  2. TreeSequence docs mistakenly refer to Deref #449

Closes #439

@molpopgen molpopgen force-pushed the low_level_ownership branch 2 times, most recently from 065440e to 0599db9 Compare January 26, 2023 20:32
…I types.

* Add NullPointer variant to sys::Error.
* All tables now have a single rust type behind them.
* OwnedXTable is now a type alias for XTable.
* remove several internal types and macros
@molpopgen molpopgen force-pushed the low_level_ownership branch from 0599db9 to 973f316 Compare January 26, 2023 20:33
@molpopgen molpopgen marked this pull request as ready for review January 26, 2023 20:37
@molpopgen molpopgen merged commit e1422c8 into main Jan 26, 2023
@molpopgen molpopgen deleted the low_level_ownership branch January 26, 2023 20:44
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.

Reconcile table ownership semantics
1 participant