Give the constant pool its own source file

This commit is contained in:
Eric Fischer
2014-09-29 12:17:35 -07:00
parent fabeb4588d
commit 8118c13a71
6 changed files with 133 additions and 128 deletions
+25
View File
@@ -0,0 +1,25 @@
struct pool_val {
char *s;
int type;
int n;
struct pool_val *left;
struct pool_val *right;
struct pool_val *next;
};
struct pool {
struct pool_val *vals;
struct pool_val *head;
struct pool_val *tail;
int n;
};
struct pool_val *pool(struct pool *p, char *s, int type);
struct pool_val *pool_long_long(struct pool *p, long long *val, int type);
void pool_free(struct pool *p);
void pool_init(struct pool *p, int n);
int is_pooled(struct pool *p, char *s, int type);