Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helpers to the Library #10

Open
lmariscal opened this issue Nov 7, 2018 · 1 comment
Open

Add helpers to the Library #10

lmariscal opened this issue Nov 7, 2018 · 1 comment

Comments

@lmariscal
Copy link
Member

This helpers would help integrate users code with the binding library, also adding easier ways to communicate Nim data types.

@xrfez
Copy link

xrfez commented Oct 25, 2022

To simplify setting flags

func toFlag[T: enum | Ordinal](flags: varargs[T]): T =
  for flag in flags:
    result = (ord(result) or ord(flag)).T

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

No branches or pull requests

2 participants