Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb53c851

Browse files
committed
Remove #ifdef MULTIBYTE
1 parentb084cc3 commitb53c851

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

‎src/backend/libpq/pqformat.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
1717
* Portions Copyright (c) 1994, Regents of the University of California
1818
*
19-
*$Id: pqformat.c,v 1.21 2002/06/20 20:29:28 momjian Exp $
19+
*$Id: pqformat.c,v 1.22 2002/08/08 06:32:26 ishii Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -52,9 +52,7 @@
5252

5353
#include"libpq/libpq.h"
5454
#include"libpq/pqformat.h"
55-
#ifdefMULTIBYTE
5655
#include"mb/pg_wchar.h"
57-
#endif
5856
#ifdefHAVE_ENDIAN_H
5957
#include<endian.h>
6058
#endif
@@ -127,7 +125,6 @@ pq_sendbytes(StringInfo buf, const char *data, int datalen)
127125
void
128126
pq_sendcountedtext(StringInfobuf,constchar*str,intslen)
129127
{
130-
#ifdefMULTIBYTE
131128
char*p;
132129

133130
p= (char*)pg_server_to_client((unsignedchar*)str,slen);
@@ -139,7 +136,6 @@ pq_sendcountedtext(StringInfo buf, const char *str, int slen)
139136
pfree(p);
140137
return;
141138
}
142-
#endif
143139
pq_sendint(buf,slen+4,4);
144140
appendBinaryStringInfo(buf,str,slen);
145141
}
@@ -156,7 +152,6 @@ pq_sendstring(StringInfo buf, const char *str)
156152
{
157153
intslen=strlen(str);
158154

159-
#ifdefMULTIBYTE
160155
char*p;
161156

162157
p= (char*)pg_server_to_client((unsignedchar*)str,slen);
@@ -167,7 +162,6 @@ pq_sendstring(StringInfo buf, const char *str)
167162
pfree(p);
168163
return;
169164
}
170-
#endif
171165
appendBinaryStringInfo(buf,str,slen+1);
172166
}
173167

@@ -232,8 +226,6 @@ int
232226
pq_puttextmessage(charmsgtype,constchar*str)
233227
{
234228
intslen=strlen(str);
235-
236-
#ifdefMULTIBYTE
237229
char*p;
238230

239231
p= (char*)pg_server_to_client((unsignedchar*)str,slen);
@@ -244,7 +236,6 @@ pq_puttextmessage(char msgtype, const char *str)
244236
pfree(p);
245237
returnresult;
246238
}
247-
#endif
248239
returnpq_putmessage(msgtype,str,slen+1);
249240
}
250241

@@ -305,14 +296,10 @@ int
305296
pq_getstr(StringInfos)
306297
{
307298
intresult;
308-
309-
#ifdefMULTIBYTE
310299
char*p;
311-
#endif
312300

313301
result=pq_getstring(s);
314302

315-
#ifdefMULTIBYTE
316303
p= (char*)pg_client_to_server((unsignedchar*)s->data,s->len);
317304
if (p!=s->data)/* actual conversion has been done? */
318305
{
@@ -322,7 +309,6 @@ pq_getstr(StringInfo s)
322309
appendBinaryStringInfo(s,p,strlen(p));
323310
pfree(p);
324311
}
325-
#endif
326312

327313
returnresult;
328314
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp