Re: [PATCH] config.c: change the function signature of `git_config_string()`

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> *1* We have safe_create_leading_directories_const() that works
> around this for input parameter around its _const less counterpart,
> which is ugly but livable solution.

I think it would actually be a reasonable solution to avoid casting here
and there on the caller side.

Another option would be to _return_ a non-const char * instead of
outputing it as a by-address parameter. We'd lose the consiseness of

   return git_config_get_string(...)

(but in cases where the return value is ignored, we do not really care)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
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]