Replace fragile dict stored-key API with getKeyId callback#1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df9a4c420c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /* Before the key is released, obtain the link to | ||
| * ensure we can safely access and update the key. */ | ||
| dictUseStoredKeyApi(d, 1); | ||
| const void *key = dictStoredKey2Key(d, ptr); |
There was a problem hiding this comment.
Export dictStoredKey2Key or avoid external use
This call won’t link as written: dictStoredKey2Key is defined static inside src/dict.c and isn’t declared in any header, so defrag.c sees no prototype (C99/-Werror → error) and the linker can’t resolve the symbol. That breaks the build for any configuration compiling defrag.c. Either expose a non-static helper in dict.h (e.g., static inline wrapper) or rewrite this site to use d->type->keyFromStoredKey directly.
Useful? React with 👍 / 👎.
Benchmark PR from agentic-review-benchmarks#1