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

Поиск
Список
Период
Сортировка
От Phil Sorber
Тема Re: get_progname() should not be const char *?
Дата
Msg-id CADAkt-gGZTneCzbrnt9+umAfvDFtBGrNgnM8BicJOfMrE9EUVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: get_progname() should not be const char *?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: get_progname() should not be const char *?  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Mon, Feb 4, 2013 at 10:52 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Is that just because of the nature of this specific function?

>
>                         regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: get_progname() should not be const char *?
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: ANSI SQL 2011 syntax for named parameters