LRANGE converted into a COW friendly command. Some refactoring, comment, and new addReply*() family function added in the process.

This commit is contained in:
antirez
2010-12-07 16:33:13 +01:00
parent bbac56c2f8
commit d51ebef509
4 changed files with 60 additions and 15 deletions

View File

@ -595,7 +595,12 @@ unsigned char *ziplistIndex(unsigned char *zl, int index) {
return (p[0] == ZIP_END || index > 0) ? NULL : p;
}
/* Return pointer to next entry in ziplist. */
/* Return pointer to next entry in ziplist.
*
* zl is the pointer to the ziplist
* p is the pointer to the current element
*
* The element after 'p' is returned, otherwise NULL if we are at the end. */
unsigned char *ziplistNext(unsigned char *zl, unsigned char *p) {
((void) zl);