mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Change pg_mblen and pg_encoding_mblen return types from void
to int so that they return the number of whcars.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
* client encoding and server internal encoding.
|
||||
* (currently mule internal code (mic) is used)
|
||||
* Tatsuo Ishii
|
||||
* $Id: mbutils.c,v 1.10 2000/06/13 07:35:12 tgl Exp $ */
|
||||
* $Id: mbutils.c,v 1.11 2000/08/27 10:40:48 ishii Exp $ */
|
||||
|
||||
|
||||
#include "postgres.h"
|
||||
@ -173,17 +173,17 @@ pg_server_to_client(unsigned char *s, int len)
|
||||
}
|
||||
|
||||
/* convert a multi-byte string to a wchar */
|
||||
void
|
||||
int
|
||||
pg_mb2wchar(const unsigned char *from, pg_wchar * to)
|
||||
{
|
||||
(*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, strlen(from));
|
||||
return (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, strlen(from));
|
||||
}
|
||||
|
||||
/* convert a multi-byte string to a wchar with a limited length */
|
||||
void
|
||||
int
|
||||
pg_mb2wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
|
||||
{
|
||||
(*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, len);
|
||||
return (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, len);
|
||||
}
|
||||
|
||||
/* returns the byte length of a multi-byte word */
|
||||
|
Reference in New Issue
Block a user