MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / lpAppend

Function lpAppend

src/listpack.c:799–803  ·  view source on GitHub ↗

Append the specified element 'ele' of length 'len' at the end of the * listpack. It is implemented in terms of lpInsert(), so the return value is * the same as lpInsert(). */

Source from the content-addressed store, hash-verified

797 * listpack. It is implemented in terms of lpInsert(), so the return value is
798 * the same as lpInsert(). */
799unsigned char *lpAppend(unsigned char *lp, unsigned char *ele, uint32_t size) {
800 uint64_t listpack_bytes = lpGetTotalBytes(lp);
801 unsigned char *eofptr = lp + listpack_bytes - 1;
802 return lpInsert(lp,ele,size,eofptr,LP_BEFORE,NULL);
803}
804
805/* Remove the element pointed by 'p', and return the resulting listpack.
806 * If 'newp' is not NULL, the next element pointer (to the right of the

Callers 2

lpAppendIntegerFunction · 0.85
streamAppendItemFunction · 0.85

Calls 1

lpInsertFunction · 0.85

Tested by

no test coverage detected