diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-24 20:01:23 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-08-24 20:01:23 +0000 |
commit | 42e2c2da3db6cba2780b125f5f1ad567d3e4b8e3 (patch) | |
tree | 1a07875474d132cdc875278414ee14d3023208b3 /include | |
parent | ff681681c9833b48b97386e4088407f7359a5b1f (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@41003 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/linkedlists.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index b91d11778..3ac3bffa7 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -430,6 +430,23 @@ struct { \ } while (0) /*! + \brief Appends a whole list to the tail of a list. + \param head This is a pointer to the list head structure + \param list This is a pointer to the list to be appended. + \param field This is the name of the field (declared using AST_LIST_ENTRY()) + used to link entries of this list together. + */ +#define AST_LIST_APPEND_LIST(head, list, field) do { \ + if (!(head)->first) { \ + (head)->first = (list)->first; \ + (head)->last = (list)->last; \ + } else { \ + (head)->last->field.next = (list)->first; \ + (head)->last = (list)->last; \ + } \ +} while (0) + +/*! \brief Removes and returns the head entry from a list. \param head This is a pointer to the list head structure \param field This is the name of the field (declared using AST_LIST_ENTRY()) |