summaryrefslogtreecommitdiffstats
path: root/generic/tkDList.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkDList.h')
-rw-r--r--generic/tkDList.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tkDList.h b/generic/tkDList.h
index 2448439..1654497 100644
--- a/generic/tkDList.h
+++ b/generic/tkDList.h
@@ -361,9 +361,9 @@ LT##_Prepend(LT *head, struct ElemType *elem) \
{ \
assert(head); \
assert(elem); \
- elem->_dl_.prev = (void *) head; \
+ elem->_dl_.prev = (PSEntry *) head; \
if (!head->first) { \
- elem->_dl_.next = (void *) head; \
+ elem->_dl_.next = (PSEntry *) head; \
head->last = elem; \
} else { \
elem->_dl_.next = head->first; \
@@ -378,9 +378,9 @@ LT##_Append(LT *head, struct ElemType *elem) \
{ \
assert(head); \
assert(elem); \
- elem->_dl_.next = (void *) head; \
+ elem->_dl_.next = (PSEntry *) head; \
if (!head->first) { \
- elem->_dl_.prev = (void *) head; \
+ elem->_dl_.prev = (PSEntry *) head; \
head->first = elem; \
} else { \
elem->_dl_.prev = head->last; \
@@ -402,9 +402,9 @@ LT##_Move(LT *dst, LT *src) \
dst->last = src->last; \
} else { \
*dst = *src; \
- dst->first->_dl_.prev = (void *) dst; \
+ dst->first->_dl_.prev = (PSEntry *) dst; \
} \
- dst->last->_dl_.next = (void *) dst; \
+ dst->last->_dl_.next = (PSEntry *) dst; \
LT##_Init(src); \
} \
} \
@@ -528,11 +528,11 @@ LT##_Traverse(LT *head, LT##_Func func) \
#define TK_DLIST_FOREACH(var, head) \
assert(head); \
- for (var = head->first ? head->first : (void *) head; var != (void *) head; var = var->_dl_.next)
+ for (var = head->first ? head->first : (PSEntry *) head; var != (PSEntry *) head; var = var->_dl_.next)
#define TK_DLIST_FOREACH_REVERSE(var, head) \
assert(head); \
- for (var = head->last ? head->last : (void *) head; var != (void *) head; var = var->_dl_.prev)
+ for (var = head->last ? head->last : (PSEntry *) head; var != (PSEntry *) head; var = var->_dl_.prev)
#endif /* TK_DLIST_DEFINED */