[Asterisk-code-review] vector: Traversal, retrieval, insert and locking enhancements (asterisk[master])

George Joseph asteriskteam at digium.com
Sat May 2 23:55:18 CDT 2015


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

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 mirror the ao2_callback
and ao2_callback_data functions.  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, 603 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/338/4
-- 
To view, visit https://gerrit.asterisk.org/338
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>



More information about the asterisk-code-review mailing list