Commit 3d7a9ac7 authored by Tatsuo Ishii's avatar Tatsuo Ishii

Fix breakage for pltcl modules. pg_get_enconv_by_encoding() has been

changed since CREATE CONVERSION supported.
parent 404e9a12
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* ENHANCEMENTS, OR MODIFICATIONS. * ENHANCEMENTS, OR MODIFICATIONS.
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.56 2002/06/15 19:54:24 momjian Exp $ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.57 2002/07/18 04:16:07 ishii Exp $
* *
**********************************************************************/ **********************************************************************/
...@@ -65,20 +65,16 @@ ...@@ -65,20 +65,16 @@
#include "mb/pg_wchar.h" #include "mb/pg_wchar.h"
static pg_enconv *tcl_enconv;
static unsigned char * static unsigned char *
utf_u2e(unsigned char *src) utf_u2e(unsigned char *src)
{ {
return pg_do_encoding_conversion(src, strlen(src), return pg_do_encoding_conversion(src, strlen(src), PG_UNICODE, GetDatabaseEncoding());
NULL, tcl_enconv->from_unicode);
} }
static unsigned char * static unsigned char *
utf_e2u(unsigned char *src) utf_e2u(unsigned char *src)
{ {
return pg_do_encoding_conversion(src, strlen(src), return pg_do_encoding_conversion(src, strlen(src), GetDatabaseEncoding(), PG_UNICODE);
tcl_enconv->to_unicode, NULL);
} }
#define PLTCL_UTF #define PLTCL_UTF
...@@ -211,14 +207,6 @@ pltcl_init_all(void) ...@@ -211,14 +207,6 @@ pltcl_init_all(void)
if (!pltcl_firstcall) if (!pltcl_firstcall)
return; return;
#ifdef PLTCL_UTF
/************************************************************
* Do unicode conversion initialization
************************************************************/
tcl_enconv = pg_get_enconv_by_encoding(GetDatabaseEncoding());
#endif
/************************************************************ /************************************************************
* Create the dummy hold interpreter to prevent close of * Create the dummy hold interpreter to prevent close of
* stdout and stderr on DeleteInterp * stdout and stderr on DeleteInterp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment