Johannes Schindelin <johannes.schinde...@gmx.de> writes:

> There is a problem, though: `git_config_pathname()` accepts a
> `const char **` parameter to set the path, yet I need to `free()`
> that pointer afterwards because it has been obtained through
> `expand_user_path()` which detaches that buffer from a `strbuf`.

"I have 'const char *' because I do not ever change the string
myself after getting it from an API function, but free() does not
want to free a const pointer" occurs sometimes in our codebase and
it is OK to cast the constness away (many callsites to free()
already do so).
--
To unsubscribe from this list: send the line "unsubscribe git" in

Reply via email to