[Asterisk-code-review] vector: Traversal, retrieval, insert and locking enhancements (asterisk[13])
George Joseph
asteriskteam at digium.com
Mon May 4 19:38:25 CDT 2015
Hello Richard Mudgett, Corey Farrell,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/339
to look at the new patch set (#6).
Change subject: vector: Traversal, retrieval, insert and locking enhancements
......................................................................
vector: Traversal, retrieval, insert and locking enhancements
Renamed AST_VECTOR_INSERT to AST_VECTOR_REPLACE because it really
does replace not insert. The few users of AST_VECTOR_INSERT were
refactored. Because these are macros, there should be no ABI
compatibility issues.
Added AST_VECTOR_INSERT_AT that actually inserts an element into the
vector at a specific index pushing existing elements to the right.
Added AST_VECTOR_GET_CMP that can retrieve from the vector based
on a user-provided compare function.
Added AST_VECTOR_CALLBACK* functions that will execute a function
for each element in the vector. Similar to ao2_callback and
ao2_callback_data functions although the vector callbacks can take
a variable number of arguments. This should allow easy migration
to a vector where a container might be too heavy.
Create R/W lock versions of macros.
Added unit tests.
ASTERISK-25045 #close
Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
---
M include/asterisk/vector.h
M main/format_cap.c
M main/rtp_engine.c
M tests/test_message.c
A tests/test_vector.c
5 files changed, 802 insertions(+), 18 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/39/339/6
--
To view, visit https://gerrit.asterisk.org/339
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
Gerrit-PatchSet: 6
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list