On Thu, 27 Aug 2009, Gustavo Sverzut Barbieri wrote:

> On Thu, Aug 27, 2009 at 12:01 PM, Vincent Torri<vto...@univ-evry.fr> wrote:
>>
>>
>> On Thu, 27 Aug 2009, Gustavo Sverzut Barbieri wrote:
>>
>>> On Wed, Aug 26, 2009 at 4:13 PM, Vincent Torri<vto...@univ-evry.fr> wrote:
>>>>
>>>>
>>>> On Wed, 26 Aug 2009, Andre Dieb wrote:
>>>>
>>>>> On Wed, Aug 26, 2009 at 3:52 PM, Vincent Torri <vto...@univ-evry.fr>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> hey,
>>>>>>
>>>>>> eina_log defines EINA_LOG_LEVEL_UNKNOWN to INT32_MIN (btw, why _MIN ?).
>>>>>> The problem is that, stdint.h, INT32_MIN is defined if the compiler is
>>>>>> not
>>>>>> a c++ one. Which, btw, that the compilation on Windows fails.
>>>>>>
>>>>>
>>>>> It is INT32_MIN (negative) so that the compiler won't set the enum
>>>>> typedef
>>>>> as unsigned int and forbid users to provide negative logging levels.
>>>>
>>>> and just -1 ?
>>>
>>> then user want to create a "more critical" level and he is believed to
>>> be undefined/unknown?
>>>
>>> the idea is us to pre-define some leves, from critical (0) to debug
>>> (4), but users are free to extend that. For example, in our set-top
>>> boxes we have EDBG (extra debug) to dump DVB tables and often we
>>> define "more than critical" levels just to reduce debug to it and
>>> avoid all warnings/messages BUT those.
>>
>> what about
>>
>> -1 : unknown
>> < -1 : ignored
>> 0...4 : the predefined
>>>
>>> 4: user defined
>>
>> of course, all this should be documented.
>
> similar to this, but -1 as unknown is not good, and -1 is ignored is
> bad! You should ignore or not based on EVS_LOG_LEVEL.

why -1 is not good ? why not forcing levels being non negative ?

Anyway, it must be fixed. Currently, every code using eina and compiled by 
a c++ compiler will fail.

Vincent

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to