[asterisk-dev] changing sizeof to __alignof__

Kevin P. Fleming kpfleming at digium.com
Tue Nov 8 12:46:54 CST 2011


On 11/04/2011 03:15 AM, Walter Doekes wrote:

> Option B: Replace the macro's I added -- with something that takes a
> type instead of a size -- so the __alignof__ keyword can stay in the
> header files (utils.h and stringfields.h) where they're less visible.
>
> I would have to replace the two macro's (ast_add_and_make_multiple_of,
> ast_make_multiple_of) from taking a size to taking a type; renaming them
> to: ast_make_room_for and ast_align_for respectively.

This option makes a lot of sense to me; logically the macro should know 
'what' it is working on, not just how large it is.

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kfleming at digium.com | SIP: kpfleming at digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com & www.asterisk.org



More information about the asterisk-dev mailing list