Skip to content

Commit 3888fe5

Browse files
authored
update C code to version 0.99.12 (#122)
Remove use of TSK_NO_BUILD_INDEXES
1 parent 6fa2057 commit 3888fe5

File tree

8 files changed

+511
-74
lines changed

8 files changed

+511
-74
lines changed

src/table_collection.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,16 +447,13 @@ impl TableCollection {
447447

448448
/// Dump the table collection to file.
449449
///
450-
/// # Note
451-
///
452-
/// This function by default uses the flag TSK_NO_BUILD_INDEXES.
453450
pub fn dump(&self, filename: &str, options: TableOutputOptions) -> TskReturnValue {
454451
let c_str = std::ffi::CString::new(filename).unwrap();
455452
let rv = unsafe {
456453
ll_bindings::tsk_table_collection_dump(
457454
self.as_ptr() as *mut ll_bindings::tsk_table_collection_t,
458455
c_str.as_ptr(),
459-
options.bits() | ll_bindings::TSK_NO_BUILD_INDEXES,
456+
options.bits(),
460457
)
461458
};
462459

src/trees.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -915,16 +915,13 @@ impl TreeSequence {
915915
/// This behavior may change in a future release, which could
916916
/// break `API`.
917917
///
918-
/// # Note
919-
///
920-
/// This function always sets the flag TSK_NO_BUILD_INDEXES.
921918
pub fn dump(&self, filename: &str, options: TableOutputOptions) -> TskReturnValue {
922919
let c_str = std::ffi::CString::new(filename).unwrap();
923920
let rv = unsafe {
924921
ll_bindings::tsk_treeseq_dump(
925922
self.as_ptr() as *mut ll_bindings::tsk_treeseq_t,
926923
c_str.as_ptr(),
927-
options.bits() | ll_bindings::TSK_NO_BUILD_INDEXES,
924+
options.bits(),
928925
)
929926
};
930927

subprojects/tskit/tskit/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ tsk_strerror_internal(int err)
357357
case TSK_ERR_NONBINARY_MUTATIONS_UNSUPPORTED:
358358
ret = "Only binary mutations are supported for this operation";
359359
break;
360+
case TSK_ERR_CANNOT_EXTEND_FROM_SELF:
361+
ret = "Tables can only be extended using rows from a different table";
362+
break;
360363

361364
/* Stats errors */
362365
case TSK_ERR_BAD_NUM_WINDOWS:

subprojects/tskit/tskit/core.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ to the API or ABI are introduced, i.e., the addition of a new function.
129129
The library patch version. Incremented when any changes not relevant to the
130130
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
131131
*/
132-
#define TSK_VERSION_PATCH 11
132+
#define TSK_VERSION_PATCH 12
133133
/** @} */
134134

135135
/* Node flags */
@@ -274,6 +274,7 @@ not found in the file.
274274
#define TSK_ERR_SORT_OFFSET_NOT_SUPPORTED -803
275275
#define TSK_ERR_NONBINARY_MUTATIONS_UNSUPPORTED -804
276276
#define TSK_ERR_MIGRATIONS_NOT_SUPPORTED -805
277+
#define TSK_ERR_CANNOT_EXTEND_FROM_SELF -806
277278

278279
/* Stats errors */
279280
#define TSK_ERR_BAD_NUM_WINDOWS -900

0 commit comments

Comments
 (0)