[asterisk-dev] watch out usages of AST_LIST_INSERT_TAIL

Luigi Rizzo rizzo at icir.org
Mon Oct 1 13:01:19 CDT 2007


On Mon, Oct 01, 2007 at 01:47:26PM -0400, Simon Perreault wrote:
> On Monday 01 October 2007 13:30:46 Jason Parker wrote:
> > Just a thought, but would it maybe be useful to have something like
> > AST_LIST_COMBINE, to add the contents of list2 to list1?
> 
> Well, if I understand correctly, the proposed modification would do just that, 
> so AST_LIST_COMBINE would needlessly duplicate functionality.

Exactly.

And besides:
1. the main reason for my suggestion is to protect the current code base
   against misuse of the existing macro

2. having multiple interfaces for basically the same thing is almost
   always leading to trouble and should be avoided, and the
   micro-optimizations that one might hope to achieve are rarely
   worth the trouble in code mainteinance and fragility.

cheers
luigi



More information about the asterisk-dev mailing list