On Mon, May 21, 2012 at 10:08 AM, Ian Lance Taylor <i...@google.com> wrote: > d...@google.com (Doug Evans) writes: > >> 2012-05-17 Doug Evans <d...@google.com> >> >> * leb128.h: New file. > > I'm not entirely sure about the use of int64_t to hold the result. Do > we want to let this interface support larger types some day? E.g., > should the result be long long? > > I'll approve this patch, but think about it. > > The patch is not as portable as possible, but it will probably be OK in > practice. You should deal with any issues that arise.
I'll change the result to size_t per Jan's request. I'm kinda worried about putting people to extra effort when they compile with -Wconversion which is why I went with int (thinking people would rather just use an int). But ok. long long (+ unsigned long long) is ok by me. I could also rename the functions to read_uleb128_to_ull (unsigned long long) to allow for a day if/when someone wants read_uleb128_to_uint64. Ok?