git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e324348)
Adjust mbutils.c so it won't get broken by future pgindent runs.
Wed, 7 Jul 2010 15:13:21 +0000 (15:13 +0000)
Wed, 7 Jul 2010 15:13:21 +0000 (15:13 +0000)
To do that, replace L'0円' by (WCHAR) 0. Perhaps someday we should teach
pgindent about wide-character literals, but so long as this is the only
use-case in the entire Postgres sources, a workaround seems easier.


diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c
index da93ad0535a3dad111caa9a6bb5273473f0a6fbe..ddaf881ce090cc8d1d495f1efedd19f373b792c2 100644 (file)
--- a/src/backend/utils/mb/mbutils.c
+++ b/src/backend/utils/mb/mbutils.c
@@ -4,7 +4,7 @@
*
* Tatsuo Ishii
*
- * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.97 2010年07月06日 21:09:00 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.98 2010年07月07日 15:13:21 tgl Exp $
*/
#include "postgres.h"
@@ -1016,7 +1016,7 @@ pgwin32_toUTF16(const char *str, int len, int *utf16len)
{
utf16 = (WCHAR *) palloc(sizeof(WCHAR) * (len + 1));
dstlen = MultiByteToWideChar(codepage, 0, str, len, utf16, len);
- utf16[dstlen] = L'0円';
+ utf16[dstlen] = (WCHAR) 0;
}
else
{
@@ -1029,7 +1029,7 @@ pgwin32_toUTF16(const char *str, int len, int *utf16len)
utf16 = (WCHAR *) palloc(sizeof(WCHAR) * (len + 1));
dstlen = MultiByteToWideChar(CP_UTF8, 0, utf8, len, utf16, len);
- utf16[dstlen] = L'0円';
+ utf16[dstlen] = (WCHAR) 0;
if (utf8 != str)
pfree(utf8);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /