Return a pointer to the last element of the listpack, or NULL if the * listpack has no elements. */
| 486 | /* Return a pointer to the last element of the listpack, or NULL if the |
| 487 | * listpack has no elements. */ |
| 488 | unsigned char *lpLast(unsigned char *lp) { |
| 489 | unsigned char *p = lp+lpGetTotalBytes(lp)-1; /* Seek EOF element. */ |
| 490 | return lpPrev(lp,p); /* Will return NULL if EOF is the only element. */ |
| 491 | } |
| 492 | |
| 493 | /* Return the number of elements inside the listpack. This function attempts |
| 494 | * to use the cached value when within range, otherwise a full scan is |
no test coverage detected