Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit45fe404

Browse files
committed
Restore compatibility with Tcl 8.0.* --- from ljb.
1 parent153e830 commit45fe404

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+
#ifTCL_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
returnTCL_ERROR;
13151319

1320+
#ifTCL_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
returnTCL_ERROR;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp