Skip to content

Add wrenGetMapCapacity and wrenGetMapKey APIs for parsing Wren maps in C - #1240

Open
Baptistegrn wants to merge 1 commit into
wren-lang:mainfrom
Baptistegrn:add-map-key-api
Open

Add wrenGetMapCapacity and wrenGetMapKey APIs for parsing Wren maps in C#1240
Baptistegrn wants to merge 1 commit into
wren-lang:mainfrom
Baptistegrn:add-map-key-api

Conversation

@Baptistegrn

Copy link
Copy Markdown

Add two functions to the Wren Map API:

wrenGetMapCapacity()
Returns the internal capacity of a Map.

wrenGetMapKey()
Retrieves the key at a specific index within the Map's capacity. This allows C code to iterate over the Map's internal entries and skip empty slots.

TODO
Reformat the code.
Improve the public API and make it more user-friendly.
Add tests for the new Map API functions.
Add documentation and examples.

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

Successfully merging this pull request may close these issues.

1 participant