Skip to content

Commit 3c738f0

Browse files
authored
Remove the unused value duplicate API from dict of libvalkey (#2387)
The commit (0700c44) removes the unused value duplicate API from dict, and libvalkey's dict needs to remain consistent with it. Signed-off-by: Xiaolong Chen <[email protected]>
1 parent b7fe0b6 commit 3c738f0

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

deps/libvalkey/src/dict.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,8 @@ void dictSetKey(dict *d, dictEntry *de, void *key) {
289289
}
290290

291291
void dictSetVal(dict *d, dictEntry *de, void *val) {
292-
if (d->type->valDup)
293-
de->val = d->type->valDup(val);
294-
else
295-
de->val = val;
292+
UNUSED(d);
293+
de->val = val;
296294
}
297295

298296
void *dictGetKey(const dictEntry *de) {

deps/libvalkey/src/dict.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ typedef struct dictEntry dictEntry; /* opaque */
4646
typedef struct dictType {
4747
uint64_t (*hashFunction)(const void *key);
4848
void *(*keyDup)(const void *key);
49-
void *(*valDup)(const void *obj);
5049
int (*keyCompare)(const void *key1, const void *key2);
5150
void (*keyDestructor)(void *key);
5251
void (*valDestructor)(void *obj);

0 commit comments

Comments
 (0)