Re: [PATCH 04/10] object-file API: have write_object_file() take "enum object_type"

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Change the write_object_file() function to take an "enum object_type"
> instead of a "const char *type". Its callers either passed
> {commit,tree,blob,tag}_type and can pass the corresponding OBJ_* type
> instead, or were hardcoding strings like "blob".
>
> This avoids the back & forth fragility where the callers of
> write_object_file() would have the enum type, and convert it
> themselves via type_name(). We do have to now do that conversion
> ourselves before calling write_object_file_prepare(), but those
> codepaths will be similarly adjusted in subsequent commits.

Up to this point, the series makes sense to me (I didn't check for
calls that were left uncoverted by mistake, or new callers that were
added on other topics---the compiler should flag them all).






[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]

  Powered by Linux