[asterisk-dev] [Code Review] astobj2 API container enhancements
Mark Michelson
reviewboard at asterisk.org
Wed Sep 12 14:15:10 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2078/#review7052
-----------------------------------------------------------
Ship it!
- Mark
On Aug. 23, 2012, 5:01 p.m., rmudgett wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2078/
> -----------------------------------------------------------
>
> (Updated Aug. 23, 2012, 5:01 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> These are the enhancements proposed by https://reviewboard.asterisk.org/r/1835/
>
> API allows for sorted containers, insertion options, duplicate handling options, and traversal order options.
>
> * Adds the ability for containers to be sorted when they are created.
>
> * Adds container creation options to handle duplicates when they are
> inserted.
>
> * Adds container creation option to insert objects at the beginning or end
> of the container traversal order.
>
> * Adds OBJ_PARTIAL_KEY to allow searching with a partial key. The partial
> key works similarly to the OBJ_KEY flag. (The real search spead
> improvement with this flag will come when red-black trees are added.)
>
> * Adds container traversal and iteration order options: Ascending and
> Descending.
>
> * Adds an AST_DEVMODE compile feature to check the stats and integrity of
> registered containers using the CLI "astobj2 container stats <name>" and
> "astobj2 container check <name>". The channels container is normally
> registered since it is one of the most important containers in the system.
>
> * Adds ao2_iterator_restart() to allow iteration to be restarted from the
> beginning.
>
> * Changes the generic container object to have a v_method table pointer to
> support other types of containers.
>
> * Changes the container nodes holding objects to be ref counted.
>
> The ref counted nodes and v_method table pointer changes pave the way to
> allow other types of containers.
>
>
> This addresses bug ASTERISK-19969.
> https://issues.asterisk.org/jira/browse/ASTERISK-19969
>
>
> Diffs
> -----
>
> /trunk/include/asterisk/astobj2.h 371646
> /trunk/main/astobj2.c 371646
> /trunk/main/channel.c 371646
> /trunk/tests/test_astobj2.c 371646
>
> Diff: https://reviewboard.asterisk.org/r/2078/diff
>
>
> Testing
> -------
>
> This patch includes a large astobj2 unit test enhancement that tests the new features.
> The unit tests pass.
>
>
> Thanks,
>
> rmudgett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120912/fbf5df24/attachment.htm>
More information about the asterisk-dev
mailing list