[hipl-dev] Re: [Merge] lp:~hipl-core/hipl/hipv2-modularization into lp:hipl

  • From: Xin <eric.nevup@xxxxxxxxx>
  • To: mp+113825@xxxxxxxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2012 13:01:17 -0000

Hi,

On 07/12/2012 03:37 PM, Christof Mroz wrote:
> One more thing, see below :(
>
>> === modified file 'libcore/builder.c'
>> --- libcore/builder.c        2012-07-07 13:42:21 +0000
>> +++ libcore/builder.c        2012-07-12 11:50:33 +0000
>> @@ -109,6 +109,11 @@
>>   
>>   static enum select_dh_key_t select_dh_key = STRONGER_KEY;
>>   
>> +enum cbo_flags {
>> +    CBO_HTON = true,
>> +    CBO_NTOH = false
>> +};
>> +
>>   /**
>>    * Convert the byte order of a list of items in one buffer.
>>    *
>> @@ -118,6 +123,7 @@
>>    *                  items in 2 bytes or 4 bytes.
>>    * @param hton      if true, perform host-to-network byte order transform,
>>    *                  other wise perform network-to-host transform.
>> + *                  @see @c cbo_flags.
>>    */
>>   static void convert_byte_order(void *content, unsigned count,
>>                                  unsigned item_size, bool hton)
> If you use the enum type rather than bool here, you don't need to
> document the "@see ..." part explicitly.
> Note that IIRC writing ::identifier creates a hyperlink to `identifier'
> in doxygen (and should issue a warning if `identifier' gets deleted),
> unlike @c.
>
> Now that I think of it, using true and false for anything but bool is
> probably unnecessarily confusing, sorry about that.
> I'd rather use opaque numeric values for enums (and avoid to cast them
> to bool implicitly), just like everywhere else in HIPL, even if C is
> very relaxed about enum and bool.
>

Ah, OK. Is this time better?
http://bazaar.launchpad.net/~hipl-core/hipl/hipv2-modularization/revision/6258

Best regards,
Xin


-- 
https://code.launchpad.net/~hipl-core/hipl/hipv2-modularization/+merge/113825
Your team HIPL core team is subscribed to branch lp:hipl.

Other related posts: