Re: [PROPOSAL] Improvements of Hunspell dictionaries support

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: [PROPOSAL] Improvements of Hunspell dictionaries support
Дата
Msg-id 56BB696F.5000300@sigaev.ru
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Improvements of Hunspell dictionaries support  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Ответы Re: [PROPOSAL] Improvements of Hunspell dictionaries support  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Re: [PROPOSAL] Improvements of Hunspell dictionaries support  (Artur Zakirov <a.zakirov@postgrespro.ru>)
Список pgsql-hackers
> I duplicate the patch here.

it's very good thing to update disctionaries to support modern versions. And 
thank you for improving documentation. Also I've impressed by long description 
in spell.c header.

Som notices about code:

1 struct SPELL. Why do you remove union p? You leave comment about using d struct instead of flag field and as can see
it'sright comment. It increases size of SPELL structure.
 

2 struct AFFIX. I'm agree with Alvaro taht sum of sizes of bit fields should be 
less or equal to size of integer. In opposite case, suppose, we can get 
undefined behavior. Please, split  bitfields  to two integers.

3 unsigned char flagval[65000];  Is it forbidden to use 65555 number? In any case, decodeFlag() doesn't  restrict
returnvalue. I suggest to enlarge array to 1<<16 and add limit  to return value of decodeFlag().
 

4 I'd like to see a short comment describing at least new functions

5 Pls, add tests for new code.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: Mike Rylander
Дата:
Сообщение: Re: old bug in full text parser
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Mac OS: invalid byte sequence for encoding "UTF8"