Skip to content

Commit

Permalink
Merge pull request #1719 from benjeffery/remove-const
Browse files Browse the repository at this point in the history
Remove const on tsk_treeseq_init
  • Loading branch information
mergify[bot] authored Sep 17, 2021
2 parents 6d9bb6e + 04b612e commit fe6121a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions c/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

**Breaking changes**

- The ``tables`` argument to ``tsk_treeseq_init`` is no longer ``const``, to allow for future no-copy tree sequence creation.
(:user:`benjeffery`, :issue:`1718`, :pr:`1719`)

**Features**

- The default behaviour for table size growth is now to double the current size of the table.
Expand Down
2 changes: 1 addition & 1 deletion c/tskit/trees.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ tsk_treeseq_init_nodes(tsk_treeseq_t *self)
*/
int TSK_WARN_UNUSED
tsk_treeseq_init(
tsk_treeseq_t *self, const tsk_table_collection_t *tables, tsk_flags_t options)
tsk_treeseq_t *self, tsk_table_collection_t *tables, tsk_flags_t options)
{
int ret = 0;
tsk_id_t num_trees;
Expand Down
2 changes: 1 addition & 1 deletion c/tskit/trees.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ typedef struct {
@{
*/
int tsk_treeseq_init(
tsk_treeseq_t *self, const tsk_table_collection_t *tables, tsk_flags_t options);
tsk_treeseq_t *self, tsk_table_collection_t *tables, tsk_flags_t options);

int tsk_treeseq_load(tsk_treeseq_t *self, const char *filename, tsk_flags_t options);
int tsk_treeseq_loadf(tsk_treeseq_t *self, FILE *file, tsk_flags_t options);
Expand Down

0 comments on commit fe6121a

Please sign in to comment.