Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Edited deps/uv/include/uv-private/linklist.h via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
mei-rune committed Oct 1, 2011
1 parent f963475 commit 717d58a
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions 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 )
//{
Expand All @@ -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)
//{
Expand All @@ -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)
//{
Expand All @@ -82,7 +73,6 @@
(_head)->_next->_prev = (_dlink);\
(_head)->_next = (_dlink)

//将项目放入双向链表头部之前
//template< typename PDLINK ,typename PVALUE >
//inline void DLINK_InsertPrev(PDLINK _head,PVALUE _dlink )
//{
Expand All @@ -95,7 +85,6 @@
(_dlink)->_next = (_head);\
(_head)->_prev->_next = (_dlink);\
(_head)->_prev = (_dlink)
//从双向链表中删除当前项目
//template< typename PDLINK >
//inline void DLINK_Remove(PDLINK _dlink)
//{
Expand All @@ -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 )
//{
Expand All @@ -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)
//{
Expand Down

0 comments on commit 717d58a

Please sign in to comment.