Skip to content

Commit 45fe404

Browse files
committed
Restore compatibility with Tcl 8.0.* --- from ljb.
1 parent 153e830 commit 45fe404

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/interfaces/libpgtcl/pgtclCmds.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.74 2003/10/31 00:18:55 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.75 2003/11/08 20:34:36 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1218,7 +1218,11 @@ Pg_lo_read(ClientData cData, Tcl_Interp *interp, int objc,
12181218

12191219
if (nbytes >= 0)
12201220
{
1221+
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1 || TCL_MAJOR_VERSION > 8
12211222
bufObj = Tcl_NewByteArrayObj(buf, nbytes);
1223+
#else
1224+
bufObj = Tcl_NewStringObj(buf, nbytes);
1225+
#endif
12221226

12231227
if (Tcl_ObjSetVar2(interp, bufVar, NULL, bufObj,
12241228
TCL_LEAVE_ERR_MSG | TCL_PARSE_PART1) == NULL)
@@ -1313,7 +1317,11 @@ Pg_lo_write(ClientData cData, Tcl_Interp *interp, int objc,
13131317
if (Tcl_GetIntFromObj(interp, objv[2], &fd) != TCL_OK)
13141318
return TCL_ERROR;
13151319

1320+
#if TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 1 || TCL_MAJOR_VERSION > 8
13161321
buf = Tcl_GetByteArrayFromObj(objv[3], &nbytes);
1322+
#else
1323+
buf = Tcl_GetStringFromObj(objv[3], &nbytes);
1324+
#endif
13171325

13181326
if (Tcl_GetIntFromObj(interp, objv[4], &len) != TCL_OK)
13191327
return TCL_ERROR;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy