1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Adjust Tcl-related code to compile cleanly with Tcl 8.4 (add const modifiers as

needed).  Some desultory const-ification of SPI interface to support this.
This commit is contained in:
Tom Lane
2002-12-30 22:10:54 +00:00
parent d82794ee33
commit 699782b695
10 changed files with 187 additions and 165 deletions

View File

@ -13,7 +13,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.37 2002/10/17 14:53:32 tgl Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.38 2002/12/30 22:10:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -218,7 +218,8 @@ PgSetConnectionId(Tcl_Interp *interp, PGconn *conn)
* Get back the connection from the Id
*/
PGconn *
PgGetConnectionId(Tcl_Interp *interp, char *id, Pg_ConnectionId ** connid_p)
PgGetConnectionId(Tcl_Interp *interp, CONST84 char *id,
Pg_ConnectionId ** connid_p)
{
Tcl_Channel conn_chan;
Pg_ConnectionId *connid;
@ -326,7 +327,7 @@ PgDelConnectionId(DRIVER_DEL_PROTO)
* is probably just not clearing result handles like they should.
*/
int
PgSetResultId(Tcl_Interp *interp, char *connid_c, PGresult *res)
PgSetResultId(Tcl_Interp *interp, CONST84 char *connid_c, PGresult *res)
{
Tcl_Channel conn_chan;
Pg_ConnectionId *connid;
@ -384,7 +385,7 @@ PgSetResultId(Tcl_Interp *interp, char *connid_c, PGresult *res)
}
static int
getresid(Tcl_Interp *interp, char *id, Pg_ConnectionId ** connid_p)
getresid(Tcl_Interp *interp, CONST84 char *id, Pg_ConnectionId ** connid_p)
{
Tcl_Channel conn_chan;
char *mark;
@ -426,7 +427,7 @@ getresid(Tcl_Interp *interp, char *id, Pg_ConnectionId ** connid_p)
* Get back the result pointer from the Id
*/
PGresult *
PgGetResultId(Tcl_Interp *interp, char *id)
PgGetResultId(Tcl_Interp *interp, CONST84 char *id)
{
Pg_ConnectionId *connid;
int resid;
@ -444,7 +445,7 @@ PgGetResultId(Tcl_Interp *interp, char *id)
* Remove a result Id from the hash tables
*/
void
PgDelResultId(Tcl_Interp *interp, char *id)
PgDelResultId(Tcl_Interp *interp, CONST84 char *id)
{
Pg_ConnectionId *connid;
int resid;
@ -460,7 +461,7 @@ PgDelResultId(Tcl_Interp *interp, char *id)
* Get the connection Id from the result Id
*/
int
PgGetConnByResultId(Tcl_Interp *interp, char *resid_c)
PgGetConnByResultId(Tcl_Interp *interp, CONST84 char *resid_c)
{
char *mark;
Tcl_Channel conn_chan;
@ -472,7 +473,8 @@ PgGetConnByResultId(Tcl_Interp *interp, char *resid_c)
*mark = '.';
if (conn_chan && Tcl_GetChannelType(conn_chan) == &Pg_ConnType)
{
Tcl_SetResult(interp, Tcl_GetChannelName(conn_chan), TCL_VOLATILE);
Tcl_SetResult(interp, (char *) Tcl_GetChannelName(conn_chan),
TCL_VOLATILE);
return TCL_OK;
}