[lkml]   [2012]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] strings: helper for maximum decimal encoding of an unsigned integer
    Jan Engelhardt wrote:

    Your way does not function as originally desired.

    * base10len(i) no longer expands to a compile-time constant

    * you will definitely have a variable base10len_vals in your
    objects, so you waste a read operation whenever it is used.

    No, I meant my original way:
    #define base10len(i) (sizeof(i) * 8 * 3 / 10 + 1)

     \ /
      Last update: 2012-09-14 17:41    [W:0.022 / U:0.064 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site