mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Switch to unsigned keys in hash, according to issue #1688290
in the sf tracker
This commit is contained in:
10
Hashtable.h
10
Hashtable.h
@ -21,7 +21,7 @@ typedef struct Hashtable_ Hashtable;
|
||||
typedef void(*Hashtable_PairFunction)(int, void*, void*);
|
||||
|
||||
typedef struct HashtableItem {
|
||||
int key;
|
||||
unsigned int key;
|
||||
void* value;
|
||||
struct HashtableItem* next;
|
||||
} HashtableItem;
|
||||
@ -41,7 +41,7 @@ int Hashtable_count(Hashtable* this);
|
||||
|
||||
#endif
|
||||
|
||||
HashtableItem* HashtableItem_new(int key, void* value);
|
||||
HashtableItem* HashtableItem_new(unsigned int key, void* value);
|
||||
|
||||
Hashtable* Hashtable_new(int size, bool owner);
|
||||
|
||||
@ -49,11 +49,11 @@ void Hashtable_delete(Hashtable* this);
|
||||
|
||||
inline int Hashtable_size(Hashtable* this);
|
||||
|
||||
void Hashtable_put(Hashtable* this, int key, void* value);
|
||||
void Hashtable_put(Hashtable* this, unsigned int key, void* value);
|
||||
|
||||
void* Hashtable_remove(Hashtable* this, int key);
|
||||
void* Hashtable_remove(Hashtable* this, unsigned int key);
|
||||
|
||||
inline void* Hashtable_get(Hashtable* this, int key);
|
||||
inline void* Hashtable_get(Hashtable* this, unsigned int key);
|
||||
|
||||
void Hashtable_foreach(Hashtable* this, Hashtable_PairFunction f, void* userData);
|
||||
|
||||
|
Reference in New Issue
Block a user