Repository navigation
constify tree C API, but short of changing tsk_tree_t type and stats functions - #920
Conversation
|
📖 Docs for this PR can be previewed here |
Codecov Report
@@ Coverage Diff @@
## main #920 +/- ##
=======================================
Coverage 93.40% 93.40%
=======================================
Files 25 25
Lines 20327 20331 +4
Branches 821 821
=======================================
+ Hits 18986 18990 +4
Misses 1304 1304
Partials 37 37
Continue to review full report at Codecov.
|
|
I'm on board with the constification - let's get #919 shipped away first and come back to this . |
c13a159 to
1112130
Compare
|
@jeromekelleher Here's the scoop now on this PR. It's ready to review. This PR constifies the non-stats tree functions. This PR does not include any of the stats functions. I'm going to constify those in a separate PR. I wasn't sure what's "public" vs not in the C API, so I was going with what shows up in the docs. With this PR effectively all methods appearing in the docs are constified. This PR also does not constify the I stated earlier that there would be 3 PRs, but I'm currently planning 4 PRs. This PR is rather small so maybe in hind sight 3 larger PR would be preferable. Let me know what you think after all is done. I'm partly doing 4 PRs mainly to see how many git topic branches and PRs I can juggle and merge simultaneously without driving myself or you crazy. 😆 Good testing for https://github.com/castedo/git-prepr |
jeromekelleher
left a comment
There was a problem hiding this comment.
LGTM @castedo, some minor inconsistencies I think. Basically, I'm happy with const self for almost all tsk_treeseq_t methods and nearly all tsk_tree_t methods.
1112130 to
61f8513
Compare
|
I think I forgot to mention that this is good to merge. |
- short of changing tsk_tree_t type - short of changing stats functions
61f8513 to
7611b5a
Compare
This PR builds on top of #919 and is a candidate for fixing #844. This PR can be taken in addition to or instead of #919. It's ready to go.
However, to really make the C API "const-correct", three pointers inside
tsk_tree_tshould arguably be made const pointers. Due to this issue, I did not upgrade the following functions:I will describe this further constification in a separate draft PR with some implications I see in tweaking
tsk_tree_t.