added support for branches and explicit transaction commit

This commit is contained in:
krangelov
2021-09-08 14:09:23 +02:00
parent 2e846cdf59
commit bcc33af36b
9 changed files with 233 additions and 91 deletions

View File

@@ -428,7 +428,7 @@ void PgfReader::read_abstract(ref<PgfAbstr> abstract)
ref<PgfPGF> PgfReader::read_pgf()
{
ref<PgfPGF> pgf = PgfDB::malloc<PgfPGF>();
ref<PgfPGF> pgf = PgfDB::malloc<PgfPGF>(sizeof(PgfPGF)+master.size+1);
pgf->major_version = read_u16be();
pgf->minor_version = read_u16be();
@@ -437,5 +437,10 @@ ref<PgfPGF> PgfReader::read_pgf()
read_abstract(ref<PgfAbstr>::from_ptr(&pgf->abstract));
pgf->prev = 0;
pgf->next = 0;
memcpy(&pgf->name, &master, sizeof(PgfText)+master.size+1);
return pgf;
}