[Asterisk-code-review] pbx: Create pbx include.c for management of 'struct ast incl... (asterisk[master])

Corey Farrell asteriskteam at digium.com
Fri Jul 15 00:24:57 CDT 2016


Hello Anonymous Coward #1000019,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/3207

to look at the new patch set (#3).

Change subject: pbx: Create pbx_include.c for management of 'struct ast_include'.
......................................................................

pbx: Create pbx_include.c for management of 'struct ast_include'.

This changes context includes from a linked list to a vector, makes
'struct ast_include' opaque to pbx.c.

Although ast_walk_context_includes is maintained the procedure is no
longer efficient except for the first call (inc==NULL).  This
functionality is replaced by two new functions implemented by vector
macros.
* ast_context_includes_count (AST_VECTOR_SIZE)
* ast_context_includes_get (AST_VECTOR_GET)

As with ast_walk_context_includes callers of these functions are
expected to have locked contexts.  Only a few places in Asterisk walked
the includes, they have been converted to use the new functions.

const have been applied where possible to parameters for ast_include
functions.

Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
---
M apps/app_macro.c
M apps/app_while.c
M include/asterisk/pbx.h
M main/pbx.c
A main/pbx_include.c
M main/pbx_private.h
M pbx/pbx_config.c
M res/ael/pval.c
M utils/extconf.c
9 files changed, 267 insertions(+), 137 deletions(-)


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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list