Re: [PATCH] Define constants for lengths of object names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 2, 2014 at 6:05 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
> brian m. carlson wrote:
>> On Thu, May 01, 2014 at 10:20:07AM -0700, Jonathan Nieder wrote:
>
>>> What happened to the
>>>
>>>      struct object_id {
>>>              unsigned char id[20];
>>>      };
>>>
>>>      ...
>>>
>>>      struct object {
>>>              ...
>>>              struct object_id id;
>>>      };
>>>
>>> idea?
>>
>> There didn't seem to be a huge amount of support for it.
>
> I can make up for it in enthuasiasm.  Please?  It's something I've
> wanted for a long time but never found the time to do.

It's definitely better in the sense that the compiler will catch new
"char[20]" declarations for us. It's also a lot more work.

>>                                                           Also, there
>> were concerns that some architectures might impose alignment constraints
>> on it that made sizeof(struct object_id) != 20.
>
> Sounds awful.  What architecture?

No architecture was named last time if I remember correctly. But we
could check "sizeof(struct object_id) == 20" in a test or something.
When people scream, we can pack the struct on that particular
platform?
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]