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

Foreign function friendly iterator request/note #343

Open
dtenny opened this issue Jan 17, 2022 · 1 comment
Open

Foreign function friendly iterator request/note #343

dtenny opened this issue Jan 17, 2022 · 1 comment

Comments

@dtenny
Copy link

dtenny commented Jan 17, 2022

I've been working on a set of foreign function APIs for Common Lisp using the CRoaring API.

Just a note that the iterator interface is a bit problematic and would benefit from a couple of additional functions that encapsulate access to the has_value and current_value members of roaring_uint32_iterator_t.

Without a function to access those members, I'm forced to write lisp structures which must model an accurate structure of the C header file declarations so that the offsets of the member variables can be correctly determined. Fortunately lisp let's me do this, but unless I add some kind of header file groveling logic on every use of the lisp API, any change to the C structure could result in improper accesses to the desired member variables.

Note that inline functions (which might be an 'accessor' temptation), mean that there is no symbol in the shared library that can be called, so would not be useful for languages calling CRoaring as a foreign API, so if accessor functions are ever provided they should not be declared 'inline'.

@lemire
Copy link
Member

lemire commented Jan 18, 2022

@dtenny Would you be willing to produce a pull request ?

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

No branches or pull requests

2 participants