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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does mbutils.c really need to use L'\0' ?
Date: 2010-07-07 15:14:36
Message-ID: 7205.1278515676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> I think all of the following codes work in the same way
> at least on Windows, where the codes are actually used.

> utf16[dstlen] = L'\0';
> utf16[dstlen] = '\0';
> utf16[dstlen] = 0;
> utf16[dstlen] = (WCHAR) 0;

The last one seems like the best choice, since it makes the intent visible.
Committed that way --- thanks for the suggestion!

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Froehlich 2010-07-07 15:19:17 Re: Python Interface Hacking
Previous Message Tom Lane 2010-07-07 14:57:59 Re: cvs to git migration - keywords