Conversation
Contributor
Author
|
Needed by the Python dict support in VUnit/vunit-python-bridge#11, which enumerates a |
Contributor
Author
|
Also fixes |
ru551n
added a commit
to ru551n/vunit-python-bridge
that referenced
this pull request
Oct 4, 2026
Needs the new_dict fix of VUnit/vunit#1229. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The pointer pool recycles pointers that can be longer than requested, while dict_t uses the pointer lengths as the bucket count and bucket sizes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ru551n
force-pushed
the
dict-key-iteration
branch
from
October 4, 2026 10:37
e719a52 to
4899efe
Compare
ru551n
added a commit
to ru551n/vunit-python-bridge
that referenced
this pull request
Oct 4, 2026
Needs the new_dict fix of VUnit/vunit#1229. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The vunit-python-bridge needs to enumerate a dict_t and read each value by type through public subprograms, without touching the private p_bucket_* fields.
API added (dict_pkg)
get_key: 0 <= index < num_keys(dict); order unspecified but stable while the dict is unmodified; reports an error if out of range. get_value_type reports an error if the key is missing. dict_pkg-2008p needs no change.
Tests
New tb_dict case enumerating a dict of mixed types, checking get_key/get_value_type after remove and across a resize (200 keys). Ran with NVC: 41 of 41 pass in the data_types run.py (tb_dict). The out-of-range error path is not tested (no existing failing-check pattern in tb_dict).
A news fragment is included.
🤖 Generated with Claude Code