[asterisk-dev] [Code Review] Simplify menuselect internals

jrose reviewboard at asterisk.org
Wed Jul 6 08:48:14 CDT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1311/#review3808
-----------------------------------------------------------



trunk/linkedlists.h
<https://reviewboard.asterisk.org/r/1311/#comment7617>

    This had me a little confused for a second, probably a sign of my greenness.  If anyone else is curious about why you would want do while 0 ever like I was, there is a stack overflow article on it here: http://stackoverflow.com/questions/154136/why-are-there-sometimes-meaningless-do-while-and-if-else-statements-in-c-c-macr


Overall this change seems pretty safe and it doesn't make a whole lot of sense to have 3 nearly identical structs back to back.  This does mean we'll be using the maximum memory for each of these items, but it's just a single integer difference.

At the same time though, this distinction between the three structs distinguished their usage.  I'm assuming a depend, a conflict, and a use aren't all that similar outside of the fact that they contain similar data.  I'm guessing we shouldn't just be calling them all 'depend's for the sake of having descriptive type names.  On the other hand, I don't have a good alternative for you either.

- jrose


On July 6, 2011, 8:06 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1311/
> -----------------------------------------------------------
> 
> (Updated July 6, 2011, 8:06 a.m.)
> 
> 
> Review request for Asterisk Developers and Kevin Fleming.
> 
> 
> Summary
> -------
> 
> A change to move a module 'use' to a 'depend' when weak linking is not detected was made recently.  Kpfleming suggested an alternative approach, which is contained in this patch.
> 
> 
> This addresses bug ASTERISK-18062.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18062
> 
> 
> Diffs
> -----
> 
>   trunk/linkedlists.h 905 
>   trunk/menuselect.h 905 
>   trunk/menuselect.c 905 
>   trunk/menuselect_curses.c 905 
>   trunk/menuselect_gtk.c 905 
>   trunk/menuselect_newt.c 905 
> 
> Diff: https://reviewboard.asterisk.org/r/1311/diff
> 
> 
> Testing
> -------
> 
> Verified that modules get moved correctly and external 'use' libraries do not when 'weak' link detection is removed.
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110706/baf17d59/attachment-0001.htm>


More information about the asterisk-dev mailing list