Making the string pool in the destination tile

This commit is contained in:
Eric Fischer
2015-08-20 14:50:26 -07:00
parent 863c9a5929
commit ed378681e4
3 changed files with 29 additions and 5 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ static int hash(const char *s) {
return h;
}
struct pool_val *pool(struct pool *p, char *s, int type) {
struct pool_val *pool(struct pool *p, const char *s, int type) {
int h = hash(s);
struct pool_val **v = &(p->vals[h]);
@@ -83,7 +83,7 @@ int is_pooled(struct pool *p, const char *s, int type) {
void pool_free1(struct pool *p, void (*func)(void *)) {
while (p->head != NULL) {
if (func != NULL) {
func(p->head->s);
func((void *) p->head->s);
}
struct pool_val *next = p->head->next;