mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
started on pgf_create_lin
This commit is contained in:
@@ -957,11 +957,26 @@ void pgf_drop_concrete(PgfDB *db, PgfRevision revision,
|
|||||||
|
|
||||||
PGF_API
|
PGF_API
|
||||||
void pgf_create_lin(PgfDB *db, PgfConcrRevision revision,
|
void pgf_create_lin(PgfDB *db, PgfConcrRevision revision,
|
||||||
PgfText *name, size_t n_prods, PgfExn *exn)
|
PgfText *name, size_t n_prods, PgfExn *err)
|
||||||
{
|
{
|
||||||
ref<PgfConcrLin> lin = PgfDB::malloc<PgfConcrLin>(name->size+1);
|
PGF_API_BEGIN {
|
||||||
lin->ref_count = 1;
|
DB_scope scope(db, WRITER_SCOPE);
|
||||||
memcpy(&lin->name, name, sizeof(PgfText)+name->size+1);
|
|
||||||
|
ref<PgfConcr> concr = PgfDB::revision2concr(revision);
|
||||||
|
|
||||||
|
ref<PgfConcrLin> lin = PgfDB::malloc<PgfConcrLin>(name->size+1);
|
||||||
|
memcpy(&lin->name, name, sizeof(PgfText)+name->size+1);
|
||||||
|
lin->ref_count = 1;
|
||||||
|
lin->res = vector_new<ref<PgfLParam>>(n_prods);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < n_prods; i++) {
|
||||||
|
}
|
||||||
|
|
||||||
|
Namespace<PgfConcrLin> lins =
|
||||||
|
namespace_insert(concr->lins, lin);
|
||||||
|
namespace_release(concr->lins);
|
||||||
|
concr->lins = lins;
|
||||||
|
} PGF_API_END
|
||||||
}
|
}
|
||||||
|
|
||||||
PGF_API
|
PGF_API
|
||||||
|
|||||||
Reference in New Issue
Block a user