Re: get_progname() should not be const char *?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: get_progname() should not be const char *?
Дата
Msg-id 29286.1360036357@sss.pgh.pa.us
обсуждение исходный текст
Ответ на get_progname() should not be const char *?  (Phil Sorber <phil@omniti.com>)
Ответы Re: get_progname() should not be const char *?  (Phil Sorber <phil@omniti.com>)
Список pgsql-hackers
Phil Sorber <phil@omniti.com> writes:
> get_progname() returns a strdup()'d value. Shouldn't it then be simply
> char * and not const char *? Otherwise free() complains loudly without
> a cast.

I don't believe that callers should be trying to free() the result.
Whether it's been strdup'd or not is not any of their business.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Reminder to committers: we're done with 8.3 branch
Следующее
От: Phil Sorber
Дата:
Сообщение: Re: get_progname() should not be const char *?