diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-09-06 02:54:56 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-09-06 02:54:56 +0000 |
commit | 37c0b648759bb24ebf17831abc35533f356be7c4 (patch) | |
tree | dc20fde37f37ac39b0067311c4b669f0d62befee /src/interfaces/libpgtcl/pgtclCmds.c | |
parent | ee0ef05b8d9b22e5c7f62cb92b54fc9acc26357d (diff) | |
download | postgresql-37c0b648759bb24ebf17831abc35533f356be7c4.tar.gz postgresql-37c0b648759bb24ebf17831abc35533f356be7c4.zip |
Below is the patch against current cvs for libpgtcl and
two additional files win32.mak and libpgtcl.def.
This patch allows to compile libpgtcl.dll on Windows
with tcl > 8.0. I've tested it on WinNT (VC6.0), SUSE Linux (7.0)
and Solaris 2.6 with tcl 8.3.3.
Mikhail Terekhov
Diffstat (limited to 'src/interfaces/libpgtcl/pgtclCmds.c')
-rw-r--r-- | src/interfaces/libpgtcl/pgtclCmds.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c index a87cb1842cb..8fef8732fd6 100644 --- a/src/interfaces/libpgtcl/pgtclCmds.c +++ b/src/interfaces/libpgtcl/pgtclCmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.56 2001/08/10 22:50:10 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.57 2001/09/06 02:54:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -403,6 +403,8 @@ Pg_connect(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) int Pg_disconnect(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) { + Pg_ConnectionId *connid; + PGconn *conn; Tcl_Channel conn_chan; if (argc != 2) @@ -419,6 +421,12 @@ Pg_disconnect(ClientData cData, Tcl_Interp *interp, int argc, char *argv[]) return TCL_ERROR; } +#if TCL_MAJOR_VERSION >= 8 + conn = PgGetConnectionId(interp, argv[1], &connid); + if (connid->notifier_channel != NULL) + Tcl_UnregisterChannel(interp, connid->notifier_channel); +#endif + return Tcl_UnregisterChannel(interp, conn_chan); } |