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(). */
| 797 | * listpack. It is implemented in terms of lpInsert(), so the return value is |
| 798 | * the same as lpInsert(). */ |
| 799 | unsigned 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 |
no test coverage detected