Browse files

Edited deps/uv/include/uv-private/linklist.h via GitHub

  • Loading branch information...
1 parent f963475 commit 717d58a8d38170b6a520747a2ac4072d7c4dbaa6 @runner-mei runner-mei committed Oct 1, 2011
Showing with 0 additions and 13 deletions.
  1. +0 −13 deps/uv/include/uv-private/linklist.h
View
13 deps/uv/include/uv-private/linklist.h
@@ -1,26 +1,22 @@
#ifndef _linklist_h_
#define _linklist_h_ 1
-// SLINK - 单向链表
//
//typedef struct _SLINK{
// _SLINK* _next;
//} SLINK,*PSLINK;
-//初始化单向链表
//template< typename PSLINK >
//inline void SLINK_Initialize(PSLINK _head )
//{ (_head)->_next = NULL; }
#define SLINK_Initialize(_head) ((_head)->_next = NULL)
-//检测单向链表是否为空
//template< typename PSLINK >
//inline bool SLINK_IsEmpty(PSLINK _head )
//{ return ((_head)->_next == NULL);}
#define SLINK_IsEmpty(_head) ((_head)->_next == NULL)
-//取出单向链表第一个项目
//template< typename PSLINK ,typename PVALUE >
//inline PVALUE SLINK_Pop(PSLINK _head )
//{
@@ -31,7 +27,6 @@
#define SLINK_Pop(_head) (_head)->_next;\
(_head)->_next = (_head)->_next->_next;
-//将项目放入单向链表头部
//template< typename PSLINK ,typename PVALUE >
//inline void SLINK_Push(PSLINK _head, PVALUE _link)
//{
@@ -45,30 +40,26 @@
/////////////////////////////DOUBLE///LINK/////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
-//DLINK - 双向链表
//
//typedef struct _DLINK{
// _DLINK* _prev;
// _DLINK* _next;
//} DLINK,*PDLINK;
-//初始化双向链表
//template< typename PDLINK >
//void DLINK_Initialize(PDLINK _head)
//{
// (_head)->_next = (_head)->_prev = (_head);
//}
#define DLINK_Initialize(_head) ((_head)->_next = (_head)->_prev = (_head))
-//检测双向链表是否为空
//template< typename PDLINK >
//bool DLINK_IsEmpty(PDLINK)
//{
// return ((_head)->_next == (_head));
//}
#define DLINK_IsEmpty(_head) ((_head)->_next == (_head))
-//将项目放入双向链表头部之后
//template< typename PDLINK ,typename PVALUE >
//inline void DLINK_InsertNext(PDLINK _head,PVALUE _dlink)
//{
@@ -82,7 +73,6 @@
(_head)->_next->_prev = (_dlink);\
(_head)->_next = (_dlink)
-//将项目放入双向链表头部之前
//template< typename PDLINK ,typename PVALUE >
//inline void DLINK_InsertPrev(PDLINK _head,PVALUE _dlink )
//{
@@ -95,7 +85,6 @@
(_dlink)->_next = (_head);\
(_head)->_prev->_next = (_dlink);\
(_head)->_prev = (_dlink)
-//从双向链表中删除当前项目
//template< typename PDLINK >
//inline void DLINK_Remove(PDLINK _dlink)
//{
@@ -104,7 +93,6 @@
//}
#define DLINK_Remove(_dlink) (_dlink)->_prev->_next = (_dlink)->_next;\
(_dlink)->_next->_prev = (_dlink)->_prev
-//从双向链表中取出当前项目的前一个
//template< typename PDLINK ,typename PVALUE >
//inline PVALUE DLINK_ExtructPrev(PDLINK _head )
//{
@@ -114,7 +102,6 @@
//}
#define DLINK_ExtructPrev(_head) (_head)->_prev;\
DLINK_Remove((_head)->_prev)
-//从双向链表中取出当前项目的下一个
//template< typename PDLINK ,typename PVALUE >
//inline PVALUE DLINK_ExtructNext(PDLINK _head)
//{

0 comments on commit 717d58a

Please sign in to comment.