[PATCH weston v2 2/4] Moved helper macro to a discrete include file.

Jon A. Cruz jonc at osg.samsung.com
Tue Jun 16 09:19:42 PDT 2015


On 06/16/2015 02:48 AM, Pekka Paalanen wrote:
> On Mon, 15 Jun 2015 15:37:08 -0700
> "Jon A. Cruz" <jonc at osg.samsung.com> wrote:
> 
>> To help reduce code duplication and also 'kitchen-sink' includes
>> the ARRAY_LENGTH macro was moved to a stand-alone file and
>> referenced from the sources consuming it. Other macros will be
>> added in subsequent passes.
>>
>> Signed-off-by: Jon A. Cruz <jonc at osg.samsung.com>
>> ---
>>  Makefile.am                        |  1 +
> 
>>  37 files changed, 83 insertions(+), 19 deletions(-)
>>  create mode 100644 shared/helpers.h
>>
>> diff --git a/Makefile.am b/Makefile.am
>> index 5819b19..261798c 100644
>> --- a/Makefile.am
>> +++ b/Makefile.am
>> @@ -189,6 +189,7 @@ westoninclude_HEADERS =				\
>>  	src/timeline-object.h			\
>>  	shared/matrix.h				\
>>  	shared/config-parser.h			\
>> +	shared/helpers.h			\
>>  	shared/zalloc.h				\
>>  	shared/platform.h
> 
> Hi,
> 
> now that helpers.h is installed, it probably shouldn't contain
> plain-named things like ARRAY_LENGTH, MIN, or container_of. This will
> be even more important in the future with libweston. Rather than put
> those in a namespace and modify a ton of code, I'd rather see this file
> not installed.

Sounds good. Actually that matches my original preference, but I was
trying to be slightly more conservative. Should be simple to do.


> You also forgot to update all SOURCES variables in Makefile.am for this
> new source file.

Oops. Will cover in next patch.

-- 
Jon A. Cruz - Senior Open Source Developer
Samsung Open Source Group
jonc at osg.samsung.com


More information about the wayland-devel mailing list