X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/6208b3a77644afe5c7c28688cd6d7554a0281953..08b59207509ffe2c6938f7051ea786c66e7fa09d:/adlist.h diff --git a/adlist.h b/adlist.h index 4d32fef5..a1209f62 100644 --- a/adlist.h +++ b/adlist.h @@ -1,6 +1,6 @@ /* adlist.h - A generic doubly linked list implementation * - * Copyright (c) 2006-2009, Salvatore Sanfilippo + * Copyright (c) 2006-2010, Salvatore Sanfilippo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,6 @@ typedef struct list { void (*free)(void *ptr); int (*match)(void *ptr, void *key); unsigned int len; - listIter iter; } list; /* Functions implemented as macros */ @@ -75,6 +74,7 @@ list *listCreate(void); void listRelease(list *list); list *listAddNodeHead(list *list, void *value); list *listAddNodeTail(list *list, void *value); +list *listInsertNode(list *list, listNode *old_node, void *value, int after); void listDelNode(list *list, listNode *node); listIter *listGetIterator(list *list, int direction); listNode *listNext(listIter *iter); @@ -82,9 +82,8 @@ void listReleaseIterator(listIter *iter); list *listDup(list *orig); listNode *listSearchKey(list *list, void *key); listNode *listIndex(list *list, int index); -void listRewind(list *list); -void listRewindTail(list *list); -listNode *listYield(list *list); +void listRewind(list *list, listIter *li); +void listRewindTail(list *list, listIter *li); /* Directions for iterators */ #define AL_START_HEAD 0