Re: [PATCH/RFC v2 09/16] Read index-v5
Thomas Gummerer <t.gummerer@gmail.com> writes:
Show 16 quoted lines
> On 08/08, Junio C Hamano wrote:
>> Thomas Gummerer <t.gummerer@gmail.com> writes:
>> ...
>> After thinking about this, the ptr_add() macro might be the best
>> solution, even though I originally called it as a band-aid. We know
>> mmap is a blob of memory, byte-offset of each component of which we
>> know about, so we can say
>>
>> name = ptr_add(mmap, *dir_offset);
>> beginning = ptr_add(mmap, *dir_offset);
>>
>> Hmmm..
>
> I start to think so too. Casting the mmap variable to "const char *"
> in the method call doesn't feel right to me, even though it would work.
> Unless there are any objections I'll use ptr_add in the next version.
Thanks for sanity checking my thinking.