move h_eq_ptr and h_hash_ptr into datastructures.c / internal.h
This commit is contained in:
parent
5593b826e3
commit
66b0ed7bf1
3 changed files with 10 additions and 4 deletions
|
|
@ -5,10 +5,6 @@
|
|||
#include <ctype.h>
|
||||
|
||||
|
||||
bool h_eq_ptr(const void *p, const void *q) { return (p==q); }
|
||||
HHashValue h_hash_ptr(const void *p) { return (uintptr_t)p; }
|
||||
|
||||
|
||||
HCFGrammar *h_cfgrammar_new(HAllocator *mm__)
|
||||
{
|
||||
HCFGrammar *g = h_new(HCFGrammar, 1);
|
||||
|
|
|
|||
|
|
@ -236,3 +236,10 @@ void h_hashtable_free(HHashTable* ht) {
|
|||
h_arena_free(ht->arena, ht->contents);
|
||||
}
|
||||
|
||||
bool h_eq_ptr(const void *p, const void *q) {
|
||||
return (p==q);
|
||||
}
|
||||
|
||||
HHashValue h_hash_ptr(const void *p) {
|
||||
return (uintptr_t)p;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -265,6 +265,9 @@ typedef HHashTable HHashSet;
|
|||
#define h_hashset_del(ht,el) h_hashtable_del(ht,el)
|
||||
#define h_hashset_free(ht) h_hashtable_free(ht)
|
||||
|
||||
bool h_eq_ptr(const void *p, const void *q);
|
||||
HHashValue h_hash_ptr(const void *p);
|
||||
|
||||
typedef struct HCFSequence_ HCFSequence;
|
||||
|
||||
typedef struct HCFChoice_ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue