Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve type safety and refactor dict entry handling (valkey-io#749)
This pull request introduces several changes to improve the type safety of Valkey's dictionary implementation: - Getter/Setter Macros: Implemented macros `DICT_SET_VALUE` and `DICT_GET_VALUE` to centralize type casting within these macros. This change emulates the behavior of C++ templates in C, limiting type casting to specific low-level operations and preventing it from being spread across the codebase. - Reduced Assert Overhead: Removed unnecessary asserts from critical hot paths in the dictionary implementation. - Consistent Naming: Standardized the naming of dictionary entry types. For example, all dictionary entry types start their names with `dictEntry`. Fix valkey-io#737 --------- Signed-off-by: Ping Xie <[email protected]> Signed-off-by: Ping Xie <[email protected]> Co-authored-by: Madelyn Olson <[email protected]>
- Loading branch information