forked from GitHub/gf-core
small fixes in the C runtime
This commit is contained in:
@@ -706,7 +706,7 @@ static PgfItem*
|
|||||||
pgf_new_item(PgfParsing* ps, PgfItemConts* conts, PgfProduction prod)
|
pgf_new_item(PgfParsing* ps, PgfItemConts* conts, PgfProduction prod)
|
||||||
{
|
{
|
||||||
PgfItem* item;
|
PgfItem* item;
|
||||||
if (ps == NULL || ps->free_item == NULL)
|
if (ps->free_item == NULL)
|
||||||
item = gu_new(PgfItem, ps->pool);
|
item = gu_new(PgfItem, ps->pool);
|
||||||
else {
|
else {
|
||||||
item = ps->free_item;
|
item = ps->free_item;
|
||||||
@@ -769,10 +769,8 @@ pgf_new_item(PgfParsing* ps, PgfItemConts* conts, PgfProduction prod)
|
|||||||
pgf_item_set_curr_symbol(item, ps->pool);
|
pgf_item_set_curr_symbol(item, ps->pool);
|
||||||
|
|
||||||
#ifdef PGF_COUNTS_DEBUG
|
#ifdef PGF_COUNTS_DEBUG
|
||||||
if (ps != NULL) {
|
ps->item_full_count++;
|
||||||
ps->item_full_count++;
|
ps->item_real_count++;
|
||||||
ps->item_real_count++;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
|
|||||||
@@ -1133,12 +1133,6 @@ pgf_ccat_set_cnccat(PgfCCat* ccat, PgfProduction prod)
|
|||||||
extern prob_t
|
extern prob_t
|
||||||
pgf_ccat_set_viterbi_prob(PgfCCat* ccat);
|
pgf_ccat_set_viterbi_prob(PgfCCat* ccat);
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
GuMapItor fn;
|
|
||||||
PgfConcr* concr;
|
|
||||||
GuPool* pool;
|
|
||||||
} PgfIndexFn;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pgf_read_ccat_cb(GuMapItor* fn, const void* key, void* value, GuExn* err)
|
pgf_read_ccat_cb(GuMapItor* fn, const void* key, void* value, GuExn* err)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user