Re: Text <-> C string

Поиск
Список
Период
Сортировка
От Volkan YAZICI
Тема Re: Text <-> C string
Дата
Msg-id 87y78e7g51.fsf@alamut.mobiliz.com.tr
обсуждение исходный текст
Ответ на Re: [PATCHES] Text <-> C string  (Sam Mason <sam@samason.me.uk>)
Ответы Re: Text <-> C string  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 19 Mar 2008, Sam Mason <sam@samason.me.uk> writes:
> ...
>   char * str = cstring_of_text(src_text);
> ...
>
> I think I got my original inspiration for doing it this way around from
> the Caml language.

Also, used in Common Lisp as class accessors:
 char *s = cstring_of(text); text *t = text_of(cstring);

But I'd vote for TextPGetCString style Tom suggested for the eye-habit
compatibility with the rest of the code.


Regards.


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

Предыдущее
От: Sam Mason
Дата:
Сообщение: Re: [PATCHES] Text <-> C string
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Enable probes to work with Mac OS X Leopard and other OSes that