Skip to content

Evaluate C++ flags type #97

Closed
Closed

Description

@gregorgorjanc

tskit C uses https://tskit.dev/tskit/docs/stable/c-api.html#c.tsk_flags_t

typedef uint32_t tsk_flags_t
Container for bitwise flags.

Bitwise flags are used in tskit as a column type and also as a way to specify options to API functions

When I started I just used int in C++,
but best to be consistent.
What should we use though?
Can we just use tsk_flags_t and how will this interact with R and Rcpp?

Activity

  1. gregorgorjanc commented on Mar 3, 2026

    @gregorgorjanc
    MemberAuthor

    We do the right thing (pass integer from R to C++ and check that it is not negative and valid for each function call) - I added more validation in #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions