"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dict.h" between
redis-6.2-rc3.tar.gz and redis-6.2.0.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

dict.h  (redis-6.2-rc3):dict.h  (redis-6.2.0)
skipping to change at line 85 skipping to change at line 85
unsigned long size; unsigned long size;
unsigned long sizemask; unsigned long sizemask;
unsigned long used; unsigned long used;
} dictht; } dictht;
typedef struct dict { typedef struct dict {
dictType *type; dictType *type;
void *privdata; void *privdata;
dictht ht[2]; dictht ht[2];
long rehashidx; /* rehashing not in progress if rehashidx == -1 */ long rehashidx; /* rehashing not in progress if rehashidx == -1 */
unsigned long iterators; /* number of iterators currently running */ int16_t pauserehash; /* If >0 rehashing is paused (<0 indicates coding error ) */
} dict; } dict;
/* If safe is set to 1 this is a safe iterator, that means, you can call /* If safe is set to 1 this is a safe iterator, that means, you can call
* dictAdd, dictFind, and other functions against the dictionary even while * dictAdd, dictFind, and other functions against the dictionary even while
* iterating. Otherwise it is a non safe iterator, and only dictNext() * iterating. Otherwise it is a non safe iterator, and only dictNext()
* should be called while iterating. */ * should be called while iterating. */
typedef struct dictIterator { typedef struct dictIterator {
dict *d; dict *d;
long index; long index;
int table, safe; int table, safe;
skipping to change at line 153 skipping to change at line 153
#define dictHashKey(d, key) (d)->type->hashFunction(key) #define dictHashKey(d, key) (d)->type->hashFunction(key)
#define dictGetKey(he) ((he)->key) #define dictGetKey(he) ((he)->key)
#define dictGetVal(he) ((he)->v.val) #define dictGetVal(he) ((he)->v.val)
#define dictGetSignedIntegerVal(he) ((he)->v.s64) #define dictGetSignedIntegerVal(he) ((he)->v.s64)
#define dictGetUnsignedIntegerVal(he) ((he)->v.u64) #define dictGetUnsignedIntegerVal(he) ((he)->v.u64)
#define dictGetDoubleVal(he) ((he)->v.d) #define dictGetDoubleVal(he) ((he)->v.d)
#define dictSlots(d) ((d)->ht[0].size+(d)->ht[1].size) #define dictSlots(d) ((d)->ht[0].size+(d)->ht[1].size)
#define dictSize(d) ((d)->ht[0].used+(d)->ht[1].used) #define dictSize(d) ((d)->ht[0].used+(d)->ht[1].used)
#define dictIsRehashing(d) ((d)->rehashidx != -1) #define dictIsRehashing(d) ((d)->rehashidx != -1)
#define dictPauseRehashing(d) (d)->pauserehash++
#define dictResumeRehashing(d) (d)->pauserehash--
/* If our unsigned long type can store a 64 bit number, use a 64 bit PRNG. */ /* If our unsigned long type can store a 64 bit number, use a 64 bit PRNG. */
#if ULONG_MAX >= 0xffffffffffffffff #if ULONG_MAX >= 0xffffffffffffffff
#define randomULong() ((unsigned long) genrand64_int64()) #define randomULong() ((unsigned long) genrand64_int64())
#else #else
#define randomULong() random() #define randomULong() random()
#endif #endif
/* API */ /* API */
dict *dictCreate(dictType *type, void *privDataPtr); dict *dictCreate(dictType *type, void *privDataPtr);
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)