diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 15:11:46 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-23 15:11:46 +0000 |
commit | 8f2fabe64f24fdfd17dcc34773bdb2adb1ef1b7e (patch) | |
tree | eadb7c681e0fecd6f7d64f2cfe5c72dedc2cd7c3 /doc | |
parent | bda9898fe134a95231748b1419ad951f413aaf08 (diff) |
Speed up ast_list macros (bug #3135)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4546 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/linkedlists.README | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/linkedlists.README b/doc/linkedlists.README index 87e396fbc..27a8e93ae 100755 --- a/doc/linkedlists.README +++ b/doc/linkedlists.README @@ -48,9 +48,10 @@ AST_LIST_REMOVE removes an arbitrary element from the head: AST_LIST_REMOVE(headp,node1,ast_var_t,listpointers); -AST_LIST_REMOVE_HEAD removes the entry at the head of the list: +AST_LIST_REMOVE_HEAD removes the entry at the head of the list and +returns a pointer to the removed entry: - AST_LIST_REMOVE(headp,listpointers); + AST_LIST_REMOVE_HEAD(headp,node,listpointers); AST_LIST_FIRST returns a pointer to the first element of the list; @@ -78,8 +79,7 @@ To completely delete a list : struct ast_var_t *vardata; while (!AST_LIST_EMPTY(headp)) { /* List Deletion. */ - vardata = AST_LIST_FIRST(head); - AST_LIST_REMOVE_HEAD(head, listpointers); + vardata = AST_LIST_REMOVE_HEAD(head, ast_var_t, listpointers); free(vardata->name); free(vardata->value); } |