diff mbox

[05/34] ptrlist: introduce the ptr_list iterator structure

Message ID 20170707134002.49500-6-luc.vanoostenryck@gmail.com (mailing list archive)
State Rejected, archived
Headers show

Commit Message

Luc Van Oostenryck July 7, 2017, 1:39 p.m. UTC
---
 ptrlist.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/ptrlist.h b/ptrlist.h
index 93de46c0b..e308f437c 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -31,6 +31,12 @@  struct ptr_list {
 	void *list[LIST_NODE_NR];
 };
 
+struct ptr_cur {
+	struct ptr_list *h;	/* head of the list */
+	struct ptr_list *l;	/* current block */
+	int n;			/* current index on the curent block */
+};
+
 #define ptr_list_empty(x) ((x) == NULL)
 
 void * undo_ptr_list_last(struct ptr_list **head);