public static void MakeWritable(Parse parse, Table table) { Debug.Assert(E.IsVirtual(table)); Parse toplevel = parse.Toplevel(); for (int i = 0; i < toplevel.VTableLocks.length; i++) { if (table == toplevel.VTableLocks[i]) { return; } } int newSize = (toplevel.VTableLocks.data == null ? 1 : toplevel.VTableLocks.length + 1); //: (toplevel->VTableLocks.length + 1) * sizeof(toplevel->VTableLocks[0]); Array.Resize(ref toplevel.VTableLocks.data, newSize); //: Table vtablelocks = (Table **)_realloc(toplevel->VTableLocks, newSize); if (true) //vtablelocks != null) { //: toplevel.VTableLocks = vtablelocks; toplevel.VTableLocks[toplevel.VTableLocks.length++] = table; } else { toplevel.Ctx.MallocFailed = true; } }