[Asterisk-code-review] vector: Add REMOVE, SORT, INSERT SORTED and RESET macros (asterisk[master])

George Joseph asteriskteam at digium.com
Sat May 9 20:49:33 CDT 2015


George Joseph has uploaded a new patch set (#3).

Change subject: vector:  Add REMOVE, SORT, INSERT_SORTED and RESET macros
......................................................................

vector:  Add REMOVE, SORT, INSERT_SORTED and RESET macros

Based on feedback from Corey Farrell and Y Ateya, a few new
macros have been added...

AST_VECTOR_REMOVE which takes a parameter to indicate if
order should be preserved.

AST_VECTOR_SORT which performs a qsort on a vector with
a user supplied compare function.

AST_VECTOR_INSERT_SORTED which inserts an element into
a sorted vector.

AST_VECTOR_RESET which cleans all elements from the vector
leaving the storage intact.

Change-Id: I41d32dbdf7137e0557134efeff9f9f1064b58d14
---
M include/asterisk/vector.h
M tests/test_vector.c
2 files changed, 143 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/22/422/3
-- 
To view, visit https://gerrit.asterisk.org/422
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I41d32dbdf7137e0557134efeff9f9f1064b58d14
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Y Ateya <y.ateya at starkbits.com>



More information about the asterisk-code-review mailing list