[Asterisk-cvs] asterisk/doc linkedlists.README,1.1,1.2

markster at lists.digium.com markster at lists.digium.com
Thu Dec 23 10:16:08 CST 2004


Update of /usr/cvsroot/asterisk/doc
In directory mongoose.digium.com:/tmp/cvs-serv32222/doc

Modified Files:
	linkedlists.README 
Log Message:
Speed up ast_list macros (bug #3135)


Index: linkedlists.README
===================================================================
RCS file: /usr/cvsroot/asterisk/doc/linkedlists.README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- linkedlists.README	26 Jul 2002 15:44:05 -0000	1.1
+++ linkedlists.README	23 Dec 2004 15:11:46 -0000	1.2
@@ -48,9 +48,10 @@
 
 	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 @@
 	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);
         }




More information about the svn-commits mailing list