bf0f2a64192b5c80db6ff314a3fa66266976ea8f braney Tue Jun 11 12:57:07 2019 -0700 ongoing work on trackDb caching diff --git src/lib/localmem.c src/lib/localmem.c index ac17ff3..de9bbcd 100644 --- src/lib/localmem.c +++ src/lib/localmem.c @@ -258,15 +258,24 @@ errAbort("lmCloneRowExt: rowOutSize (%d) must be greater than or equal to rowInSize (%d)", rowOutSize, rowInSize); char **rowClone = NULL; lmAllocArray(lm, rowClone, rowOutSize); int i; for (i = 0; i < rowInSize; i++) rowClone[i] = lmCloneString(lm, row[i]); return rowClone; } char **lmCloneRow(struct lm *lm, char **row, int rowSize) /* Allocate an array of strings and its contents cloned from row. */ { return lmCloneRowExt(lm, row, rowSize, rowSize); } + +void lmRefAdd(struct lm *lm, struct slRef **pRefList, void *val) +/* Add reference to list. */ +{ +struct slRef *ref; +lmAllocVar(lm, ref); +ref->val = val; +slAddHead(pRefList, ref); +}