Refactor dict#173
Merged
bjosv merged 10 commits intovalkey-io:mainfrom Mar 6, 2025
Merged
Conversation
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
This matches the dictEntry is valkey which also is opaque. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Since the privdata pointer is not used in libvalkey we can remove it. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Enables us to use Valkeys dict type which dont have valdup. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Collaborator
|
We'll most likely vendor it as before. We don't use git submodules now so that would be a large change to the tool chain, source releases, etc. |
zuiderkwast
approved these changes
Mar 4, 2025
Collaborator
zuiderkwast
left a comment
There was a problem hiding this comment.
Looks like a cleanup. More lines deleted than added. That's always nice.
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
michael-grunder
approved these changes
Mar 5, 2025
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.
To be able to use
dictfrom Valkey I have found that following changes would be neededdictSetHash*todictSet*(matching API)dictGetEntry*todictGet*(matching API)dictEntryopaqueThis matches the
dictEntryis valkey which also is opaque.privdatafrom dict.Since the
privdatapointer is not used in libvalkey we can remove it.Allows us to handle different ordering in the dictType struct.
valDupValkeys dict type don't have
valDup, i.e a function that can copy the inserted data.We can avoid this difference by manually copy the value.
callbackHashreturns an unsigned long int in valkey, we can use that as well.With these changes we would be able to build libvalkey using
dictfrom valkeys repos in its current state.