Skip to content

Commit 10b565a

Browse files
committed
Rename ConTable::mempool to desc_pool
1 parent 5d5df94 commit 10b565a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

link-grammar/connectors.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ void condesc_delete(Dictionary dict)
476476
ConTable *ct = &dict->contable;
477477

478478
free(ct->hdesc);
479-
pool_delete(ct->mempool);
479+
pool_delete(ct->desc_pool);
480480
condesc_length_limit_def_delete(ct);
481481
}
482482

@@ -487,7 +487,7 @@ void condesc_reuse(Dictionary dict)
487487
ct->num_con = 0;
488488
ct->num_uc = 0;
489489
memset(ct->hdesc, 0, ct->size * sizeof(hdesc_t));
490-
pool_reuse(ct->mempool);
490+
pool_reuse(ct->desc_pool);
491491
}
492492

493493
static hdesc_t *condesc_find(ConTable *ct, const char *constring, uint32_t hash)
@@ -548,7 +548,7 @@ condesc_t *condesc_add(ConTable *ct, const char *constring)
548548
if (NULL == h->desc)
549549
{
550550
lgdebug(+11, "Creating connector '%s' (%zu)\n", constring, ct->num_con);
551-
h->desc = pool_alloc(ct->mempool);
551+
h->desc = pool_alloc(ct->desc_pool);
552552
h->string = constring;
553553
h->desc->uc_num = UINT32_MAX;
554554
h->str_hash = hash;
@@ -570,7 +570,7 @@ void condesc_init(Dictionary dict, size_t num_con)
570570
{
571571
ConTable *ct = &dict->contable;
572572

573-
ct->mempool = pool_new(__func__, "ConTable",
573+
ct->desc_pool = pool_new(__func__, "condesc_t",
574574
/*num_elements*/num_con, sizeof(condesc_t),
575575
/*zero_out*/true, /*align*/true, /*exact*/false);
576576

link-grammar/connectors.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ typedef struct
135135
size_t num_con; /* Number of connector types */
136136
size_t num_uc; /* Number of connector types with different UC part */
137137
size_t last_num; /* All condescs up to here have been done already. */
138-
Pool_desc *mempool;
138+
Pool_desc *desc_pool; /* For condesc_t elements. */
139+
Pool_desc *more_pool; /* For condesc_t::more. */
139140
length_limit_def_t *length_limit_def;
140141
length_limit_def_t **length_limit_def_next;
141142
} ConTable;

0 commit comments

Comments
 (0)