mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Change wchar2char() and char2wchar() to accept a locale_t.
These are libc-specific functions, so should require a locale_t rather than a pg_locale_t (which could use another provider). Discussion: https://postgr.es/m/a8666c391dfcabe79868d95f7160eac533ace718.camel%40j-davis.com
This commit is contained in:
@@ -36,7 +36,7 @@ t_isalpha(const char *ptr)
|
||||
{
|
||||
int clen = pg_mblen(ptr);
|
||||
wchar_t character[WC_BUF_LEN];
|
||||
pg_locale_t mylocale = 0; /* TODO */
|
||||
locale_t mylocale = 0; /* TODO */
|
||||
|
||||
if (clen == 1 || database_ctype_is_c)
|
||||
return isalpha(TOUCHAR(ptr));
|
||||
@@ -51,7 +51,7 @@ t_isalnum(const char *ptr)
|
||||
{
|
||||
int clen = pg_mblen(ptr);
|
||||
wchar_t character[WC_BUF_LEN];
|
||||
pg_locale_t mylocale = 0; /* TODO */
|
||||
locale_t mylocale = 0; /* TODO */
|
||||
|
||||
if (clen == 1 || database_ctype_is_c)
|
||||
return isalnum(TOUCHAR(ptr));
|
||||
|
@@ -299,7 +299,7 @@ TParserInit(char *str, int len)
|
||||
*/
|
||||
if (prs->charmaxlen > 1)
|
||||
{
|
||||
pg_locale_t mylocale = 0; /* TODO */
|
||||
locale_t mylocale = 0; /* TODO */
|
||||
|
||||
prs->usewide = true;
|
||||
if (database_ctype_is_c)
|
||||
|
Reference in New Issue
Block a user