1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-21 02:52:47 +03:00

Move wchar2char() and char2wchar() from tsearch into /mb to be easier to

use for other modules;  also move pnstrdup().

Clean up code slightly.
This commit is contained in:
Bruce Momjian
2008-06-18 18:42:54 +00:00
parent 3eb9da524d
commit 9de09c087d
8 changed files with 155 additions and 140 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.9 2008/01/01 19:45:52 momjian Exp $
* $PostgreSQL: pgsql/src/backend/tsearch/ts_utils.c,v 1.10 2008/06/18 18:42:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -153,13 +153,3 @@ searchstoplist(StopList *s, char *key)
bsearch(&key, s->stop, s->len,
sizeof(char *), comparestr)) ? true : false;
}
char *
pnstrdup(const char *in, int len)
{
char *out = palloc(len + 1);
memcpy(out, in, len);
out[len] = '\0';
return out;
}