Skip to content

Commit 08bc7e9

Browse files
committed
Update tskit C API to version 1.3.1
1 parent 16d5be2 commit 08bc7e9

15 files changed

Lines changed: 80 additions & 79 deletions

File tree

RcppTskit/NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ and releases adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html
5050

5151
- Turn vignette URL as hyperlinks and similar cosmetics.
5252
- State mirroring of the `R/Python` APIs and `C++/C` APIs across the package.
53+
- Update tskit C to 1.3.1
5354
- TODO
5455

5556
## [0.2.0] - 2026-02-22
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1
1+
2.1.2

RcppTskit/inst/include/tskit/tskit/core.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extern "C" {
4242

4343
#ifdef __GNUC__
4444
#define TSK_WARN_UNUSED __attribute__((warn_unused_result))
45-
#define TSK_UNUSED(x) TSK_UNUSED_##x __attribute__((__unused__))
45+
#define TSK_UNUSED(x) TSK_UNUSED_##x __attribute__((__unused__))
4646
#else
4747
#define TSK_WARN_UNUSED
4848
#define TSK_UNUSED(x) TSK_UNUSED_##x
@@ -93,11 +93,11 @@ missing data.
9393
* on the thread above.
9494
*/
9595
typedef int64_t tsk_id_t;
96-
#define TSK_MAX_ID INT64_MAX - 1
96+
#define TSK_MAX_ID INT64_MAX - 1
9797
#define TSK_ID_STORAGE_TYPE KAS_INT64
9898
#else
9999
typedef int32_t tsk_id_t;
100-
#define TSK_MAX_ID INT32_MAX - 1
100+
#define TSK_MAX_ID INT32_MAX - 1
101101
#define TSK_ID_STORAGE_TYPE KAS_INT32
102102
#endif
103103

@@ -109,7 +109,7 @@ The ``tsk_size_t`` type is an unsigned integer used for any size or count value.
109109
@endrst
110110
*/
111111
typedef uint64_t tsk_size_t;
112-
#define TSK_MAX_SIZE UINT64_MAX
112+
#define TSK_MAX_SIZE UINT64_MAX
113113
#define TSK_SIZE_STORAGE_TYPE KAS_UINT64
114114

115115
/**
@@ -152,7 +152,7 @@ to the API or ABI are introduced, i.e., the addition of a new function.
152152
The library patch version. Incremented when any changes not relevant to the
153153
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
154154
*/
155-
#define TSK_VERSION_PATCH 0
155+
#define TSK_VERSION_PATCH 1
156156
/** @} */
157157

158158
/*

RcppTskit/inst/include/tskit/tskit/kastore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ to the API or ABI are introduced, i.e., the addition of a new function.
157157
The library patch version. Incremented when any changes not relevant to the
158158
to the API or ABI are introduced, i.e., internal refactors of bugfixes.
159159
*/
160-
#define KAS_VERSION_PATCH 1
160+
#define KAS_VERSION_PATCH 2
161161
/** @} */
162162

163163
#define KAS_HEADER_SIZE 64

RcppTskit/inst/include/tskit/tskit/tables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4607,7 +4607,7 @@ tsk_id_t tsk_table_collection_check_integrity(
46074607
/* Undocumented methods */
46084608

46094609
/* Flags for ibd_segments */
4610-
#define TSK_IBD_STORE_PAIRS (1 << 0)
4610+
#define TSK_IBD_STORE_PAIRS (1 << 0)
46114611
#define TSK_IBD_STORE_SEGMENTS (1 << 1)
46124612

46134613
/* TODO be systematic about where "result" should be in the params

RcppTskit/inst/include/tskit/tskit/trees.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ sequence.
663663
@endrst
664664
665665
@param self A pointer to a tsk_treeseq_t object.
666-
@return Returns a pointer to the time units.
666+
@return Returns a pointer to the null-terminated file uuid.
667667
*/
668668
const char *tsk_treeseq_get_file_uuid(const tsk_treeseq_t *self);
669669

RcppTskit/src/tskit/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.1
1+
2.1.2

RcppTskit/src/tskit/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,8 @@ tsk_search_sorted(const double *restrict array, tsk_size_t size, double value)
883883
upper = mid;
884884
}
885885
}
886-
offset = (int64_t)(array[lower] < value);
887-
return (tsk_size_t)(lower + offset);
886+
offset = (int64_t) (array[lower] < value);
887+
return (tsk_size_t) (lower + offset);
888888
}
889889

890890
/* Rounds the specified double to the closest multiple of 10**-num_digits. If

0 commit comments

Comments
 (0)