RoaringBitmap / RoaringBitmap/CRoaring

Foreign function friendly iterator request/note

Open
#343 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.9k
Forks
334
Avg merge
2d 5h
Merged PRs (30d)
17

Description

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'.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the public definition of roaring_uint32_iterator_t and the existing iterator API. Add callable, non-inline accessors for has_value and current_value, then verify that the functions are exposed for foreign callers and preserve the intended iterator behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.