From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCHES] Text <-> C string |
Date: | 2008-03-19 17:44:36 |
Message-ID: | 20080319174436.GC6870@frubble.xen.chris-lamb.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Wed, Mar 19, 2008 at 12:51:35PM -0400, Tom Lane wrote:
> "Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> > char * text_cstring(const text *t)
>
> What do people think of text_to_cstring?
I tend to put things the other way around in my code, i.e:
char * cstring_of_text(const text *t)
mainly because things read more easily---type definitions of new
variables are next to the first part of the word.
char * str = cstring_of_text(src_text);
vs.
char * str = text_to_cstring(src_text);
I think I got my original inspiration for doing it this way around from
the Caml language.
Sam
From | Date | Subject | |
---|---|---|---|
Next Message | Volkan YAZICI | 2008-03-19 17:55:22 | Re: Text <-> C string |
Previous Message | Michael Meskes | 2008-03-19 16:56:19 | Re: Request for feature - ECPGget_PGconn |
From | Date | Subject | |
---|---|---|---|
Next Message | Volkan YAZICI | 2008-03-19 17:55:22 | Re: Text <-> C string |
Previous Message | Tom Lane | 2008-03-19 16:51:35 | Re: [PATCHES] Text <-> C string |