Re: question on how to correctly communicate with external library functions which return malloc()'ed strings
В списке pgsql-hackers по дате отправления:
| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера