1
0
forked from GitHub/gf-core

Unify the data model between the C runtime and the Haskell binding

This commit is contained in:
krangelov
2021-11-09 02:04:36 +01:00
parent b3ef14c39b
commit 6552bcf909
13 changed files with 118 additions and 140 deletions

View File

@@ -955,6 +955,15 @@ void pgf_drop_concrete(PgfDB *db, PgfRevision revision,
} PGF_API_END
}
PGF_API
void pgf_create_lin(PgfDB *db, PgfConcrRevision revision,
PgfText *name, size_t n_prods, PgfExn *exn)
{
ref<PgfConcrLin> lin = PgfDB::malloc<PgfConcrLin>(name->size+1);
lin->ref_count = 1;
memcpy(&lin->name, name, sizeof(PgfText)+name->size+1);
}
PGF_API
PgfLiteral pgf_get_global_flag(PgfDB *db, PgfRevision revision,
PgfText *name,