From 04b612ea2435f105eca462883f002bfd977b0c43 Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Fri, 17 Sep 2021 14:47:37 +0100 Subject: [PATCH] Remove const on tsk_treeseq_init --- c/CHANGELOG.rst | 3 +++ c/tskit/trees.c | 2 +- c/tskit/trees.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/c/CHANGELOG.rst b/c/CHANGELOG.rst index e094f53774..a4eb87e473 100644 --- a/c/CHANGELOG.rst +++ b/c/CHANGELOG.rst @@ -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. diff --git a/c/tskit/trees.c b/c/tskit/trees.c index 621af66bbf..caa1a31652 100644 --- a/c/tskit/trees.c +++ b/c/tskit/trees.c @@ -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; diff --git a/c/tskit/trees.h b/c/tskit/trees.h index 811195c99b..448802ec88 100644 --- a/c/tskit/trees.h +++ b/c/tskit/trees.h @@ -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);