-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
The current TableCollection relies on a heap-allocated tsk_table_collection_t stored in a Box. Thus, we have to do all this "maybe uninitialized" stuff. It would be an improvement to take a cue from rust-GSL and offload the necessary boiler plate to a macro:
- Pass in the type name, "tskit init" function name, and "tskit free" function name.
- Heap allocate the type.
- Init.
- Implement Drop using the free function.
- Provide boiler plate for owning and non-owning wrappers, etc..
The nice thing is that this can all be done w/o breaking user-facing API and we can re-use the macro for other types.
Metadata
Metadata
Assignees
Labels
No labels