Re: Does mbutils.c really need to use L'\0' ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does mbutils.c really need to use L'\0' ?
Date: 2010-07-06 22:23:39
Message-ID: 18597.1278455019@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Tom Lane wrote:
>> I'm dubious that it's worth the trouble. I suggest that it might be
>> best to replace these usages of L'\0' by plain scalar 0. Does anyone
>> think that wouldn't work or is too grotty?

> or maybe 0x0000, which I gather from
> <http://en.wikipedia.org/wiki/Wide_character> is the usual locution.

Hm. I don't really read that page as suggesting that 0x0000 is what to
use if your compiler hasn't got wide chars. I'd tend to go with just 0,
which is a reasonably common substitute for non-wide '\0' ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-06 23:09:21 Re: Re: [COMMITTERS] pgsql: Fix log_temp_files docs and comments to say bytes not kilobytes.
Previous Message Tom Lane 2010-07-06 22:15:29 Re: [COMMITTERS] pgsql: Add note that using PL/Python 2 and 3 in the same session will