Re: question on how to correctly communicate with external library functions which return malloc()'ed strings

Поиск
Список
Период
Сортировка
От Vladimir Volovich
Тема Re: question on how to correctly communicate with external library functions which return malloc()'ed strings
Дата
Msg-id 87tzi82olx.fsf@external.prs-office.com
обсуждение исходный текст
Ответ на Re: question on how to correctly communicate with external library functions which return malloc()'ed strings  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: question on how to correctly communicate with external library functions which return malloc()'ed strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"MvO" == Martijn van Oosterhout writes:
>> it worked fine with postgresql 8.2; with 8.3 it started segfaulting,>> and it appeared that the reason is because in
postgresql8.3, the>> "free" is a macro defined in snowball/header.h: #define free(a)>> pfree(a)
 
MvO> It does seem wrong. Do you include that header file explicitly?MvO> Because it shouldn't be necessary.

i needed some prototypes from snowball in the same source file, so i
included snowball/header.h; it appears that it is sufficient to use #include <snowball/libstemmer/api.h>
instead of #include <snowball/header.h>

but please remove the "#define free" from snowball/header.h because, as
you said, it's wrong.

Best,
v.



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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: Commit fest queue
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Index AM change proposals, redux