forked from Telodendria/Telodendria
Format source code, add .exrc
This commit is contained in:
parent
84f311ae09
commit
7544a97c7d
4 changed files with 30 additions and 20 deletions
2
.exrc
Normal file
2
.exrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
set tabstop=4
|
||||
set expandtab
|
10
src/Db.c
10
src/Db.c
|
@ -423,6 +423,9 @@ DbLockFromArr(Db * db, Array * args)
|
|||
}
|
||||
else
|
||||
{
|
||||
Array *name = ArrayCreate();
|
||||
size_t i;
|
||||
|
||||
/* Not in cache; load from disk */
|
||||
|
||||
ref = Malloc(sizeof(DbRef));
|
||||
|
@ -448,7 +451,12 @@ DbLockFromArr(Db * db, Array * args)
|
|||
|
||||
ref->ts = UtilServerTs();
|
||||
ref->size = DbComputeSize(ref->json);
|
||||
ref->name = ArrayDuplicate(args);
|
||||
|
||||
for (i = 0; i < ArraySize(args); i++)
|
||||
{
|
||||
ArrayAdd(name, UtilStringDuplicate(ArrayGet(args, i)));
|
||||
}
|
||||
ref->name = name;
|
||||
|
||||
HashMapSet(db->cache, hash, ref);
|
||||
db->cacheSize += ref->size;
|
||||
|
|
Loading…
Reference in a new issue