Re: patch: utf8_to_unicode (trivial)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: patch: utf8_to_unicode (trivial)
Дата
Msg-id AANLkTinPVJidQ2_d4zK+EXQbqEGFjCG_nJosUfuTS6Q2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: patch: utf8_to_unicode (trivial)  (Joseph Adams <joeyadams3.14159@gmail.com>)
Ответы Re: patch: utf8_to_unicode (trivial)  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On Fri, Aug 13, 2010 at 3:12 AM, Joseph Adams
<joeyadams3.14159@gmail.com> wrote:
> I've attached another patch that moves utf8_to_unicode to src/port per
> Robert Haas's suggestion.
>
> This patch itself is not quite as elegant as the first one because it
> puts platform-independent code that "belongs" in wchar.c into src/port
> .  It also uses unsigned int instead of pg_wchar because the typedef
> of pg_wchar isn't available to the frontend, if I'm not mistaken.

Well, right now, in addition to having two copies of utf2ucs(), we
have two declarations of pg_wchar, one in src/bin/psql/mbprint.c and
the other in src/include/mb/pg_wchar.h; so both existing copies of the
function are able to use that typedef.  It seems like we might want to
move the typedef to the same place as the declaration of the renamed
utf2ucs(), but I'm not quite sure where that should be.  The only
header in src/port is pthread-win32.h, and we're sure not going to put
it there.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [ADMIN] postgres 9.0 crash when bringing up hot standby
Следующее
От: Robert Haas
Дата:
Сообщение: Re: RecordTransactionCommit() and SharedInvalidationMessages