COW friendly versions of SPOP and SRANDMEMBER commands, with some change to the set encoding-agnostic API.

This commit is contained in:
antirez
2010-12-09 10:21:02 +01:00
parent d51ebef509
commit a5be65f71c
4 changed files with 45 additions and 34 deletions

View File

@ -179,7 +179,7 @@ intset *intsetAdd(intset *is, int64_t value, uint8_t *success) {
}
/* Delete integer from intset */
intset *intsetRemove(intset *is, int64_t value, uint8_t *success) {
intset *intsetRemove(intset *is, int64_t value, int *success) {
uint8_t valenc = _intsetValueEncoding(value);
uint32_t pos;
if (success) *success = 0;