aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-11-08 20:34:36 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-11-08 20:34:36 +0000
commit45fe4042df7d8c7c505d1c76007515f7d68114cd (patch)
tree6c8bbaadb3563c85c6eee4b762833fcee6532309
parent153e83027de3ff7497829b4e91476828446e6928 (diff)
downloadpostgresql-45fe4042df7d8c7c505d1c76007515f7d68114cd.tar.gz
postgresql-45fe4042df7d8c7c505d1c76007515f7d68114cd.zip
Restore compatibility with Tcl 8.0.* --- from ljb.
-rw-r--r--src/interfaces/libpgtcl/pgtclCmds.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interfaces/libpgtcl/pgtclCmds.c b/src/interfaces/libpgtcl/pgtclCmds.c
index dad51c4dcfd..38970a1f168 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.74 2003/10/31 00:18:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.75 2003/11/08 20:34:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1218,7 +1218,11 @@ Pg_lo_read(ClientData cData, Tcl_Interp *interp, int objc,
if (nbytes >= 0)
{
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1 || TCL_MAJOR_VERSION > 8
bufObj = Tcl_NewByteArrayObj(buf, nbytes);
+#else
+ bufObj = Tcl_NewStringObj(buf, nbytes);
+#endif
if (Tcl_ObjSetVar2(interp, bufVar, NULL, bufObj,
TCL_LEAVE_ERR_MSG | TCL_PARSE_PART1) == NULL)
@@ -1313,7 +1317,11 @@ Pg_lo_write(ClientData cData, Tcl_Interp *interp, int objc,
if (Tcl_GetIntFromObj(interp, objv[2], &fd) != TCL_OK)
return TCL_ERROR;
+#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1 || TCL_MAJOR_VERSION > 8
buf = Tcl_GetByteArrayFromObj(objv[3], &nbytes);
+#else
+ buf = Tcl_GetStringFromObj(objv[3], &nbytes);
+#endif
if (Tcl_GetIntFromObj(interp, objv[4], &len) != TCL_OK)
return TCL_ERROR;