From 09f82d4e1e6dd1672b272c314c42d5cf30c91ea8 Mon Sep 17 00:00:00 2001 From: bustico Date: Mon, 19 May 2008 15:31:30 +0000 Subject: * make the lib and api more robust by adding const where they should be * compile with -Wall and eliminate remaining warnings --- src/ivytcl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ivytcl.c') diff --git a/src/ivytcl.c b/src/ivytcl.c index 19a6b6b..5fb7880 100644 --- a/src/ivytcl.c +++ b/src/ivytcl.c @@ -124,7 +124,7 @@ Channel IvyChannelAdd(HANDLE fd, void *data, channel->fd = fd; /*printf("Create handle fd %d\n", fd);*/ - channel->tcl_channel = Tcl_MakeTcpClientChannel((void*) fd); + channel->tcl_channel = Tcl_MakeTcpClientChannel((void*) (long) fd); Tcl_CreateChannelHandler(channel->tcl_channel, TCL_READABLE|TCL_EXCEPTION, IvyHandleFd, (ClientData) channel); return channel; @@ -431,7 +431,7 @@ IvyBindCmd(ClientData clientData, strcpy(filter->script, argv[2]); filter->id = IvyBindMsg(IvyMsgCB, (void *) filter, filter->filter, NULL); /* MsgPtr id */ filter->interp = interp; - entry = Tcl_CreateHashEntry(&filter_table, (char *) filter_id, &dummy); + entry = Tcl_CreateHashEntry(&filter_table, (char *) (long) filter_id, &dummy); Tcl_SetHashValue(entry, (ClientData) filter); sprintf(msg, "%d", filter_id); filter_id++; @@ -446,7 +446,7 @@ IvyUnbindCmd(ClientData clientData, int argc, const char **argv) { - unsigned long filter_id; + unsigned long filterId; char *end; filter_struct *filter; Tcl_HashEntry *entry; @@ -455,13 +455,13 @@ IvyUnbindCmd(ClientData clientData, argv[0], " filterId\"", (char *) NULL); return TCL_ERROR; } - filter_id = strtol(argv[1], &end, 10); + filterId = strtol(argv[1], &end, 10); if (*end) { Tcl_AppendResult(interp, argv[0], " wrong filter id: \"", argv[1], (char *) NULL); return TCL_ERROR; } - entry = Tcl_FindHashEntry(&filter_table, (char *) filter_id); + entry = Tcl_FindHashEntry(&filter_table, (char *) filterId); if (!entry) { Tcl_AppendResult(interp, argv[0], " unknown filter: \"", argv[1], (char *) NULL); -- cgit v1.1