Skip to content

Commit 3d7a9ac

Browse files
committed
Fix breakage for pltcl modules. pg_get_enconv_by_encoding() has been
changed since CREATE CONVERSION supported.
1 parent 404e9a1 commit 3d7a9ac

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/pl/tcl/pltcl.c

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* ENHANCEMENTS, OR MODIFICATIONS.
3232
*
3333
* IDENTIFICATION
34-
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.56 2002/06/15 19:54:24 momjian Exp $
34+
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.57 2002/07/18 04:16:07 ishii Exp $
3535
*
3636
**********************************************************************/
3737

@@ -65,20 +65,16 @@
6565

6666
#include "mb/pg_wchar.h"
6767

68-
static pg_enconv *tcl_enconv;
69-
7068
static unsigned char *
7169
utf_u2e(unsigned char *src)
7270
{
73-
return pg_do_encoding_conversion(src, strlen(src),
74-
NULL, tcl_enconv->from_unicode);
71+
return pg_do_encoding_conversion(src, strlen(src), PG_UNICODE, GetDatabaseEncoding());
7572
}
7673

7774
static unsigned char *
7875
utf_e2u(unsigned char *src)
7976
{
80-
return pg_do_encoding_conversion(src, strlen(src),
81-
tcl_enconv->to_unicode, NULL);
77+
return pg_do_encoding_conversion(src, strlen(src), GetDatabaseEncoding(), PG_UNICODE);
8278
}
8379

8480
#define PLTCL_UTF
@@ -211,14 +207,6 @@ pltcl_init_all(void)
211207
if (!pltcl_firstcall)
212208
return;
213209

214-
#ifdef PLTCL_UTF
215-
/************************************************************
216-
* Do unicode conversion initialization
217-
************************************************************/
218-
219-
tcl_enconv = pg_get_enconv_by_encoding(GetDatabaseEncoding());
220-
#endif
221-
222210
/************************************************************
223211
* Create the dummy hold interpreter to prevent close of
224212
* stdout and stderr on DeleteInterp

0 commit comments

Comments
 (0)