diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 15:06:47 (GMT) |
commit | 0da519374fd5eda8bb87a127abdefffdffb33b0a (patch) | |
tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /win/tclWinConsole.c | |
parent | 49da32e6e4e84c1e3ca79b7fa03f4ee0b78728dd (diff) | |
download | tcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.zip tcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.tar.gz tcl-0da519374fd5eda8bb87a127abdefffdffb33b0a.tar.bz2 |
Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts in
rest of Tcl source code. No ABI change. API change *should* be harmless.
Diffstat (limited to 'win/tclWinConsole.c')
-rw-r--r-- | win/tclWinConsole.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index a056040..1912433 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -428,7 +428,7 @@ ConsoleCheckProc( if (needEvent) { infoPtr->flags |= CONSOLE_PENDING; - evPtr = (ConsoleEvent *) ckalloc(sizeof(ConsoleEvent)); + evPtr = ckalloc(sizeof(ConsoleEvent)); evPtr->header.proc = ConsoleEventProc; evPtr->infoPtr = infoPtr; Tcl_QueueEvent((Tcl_Event *) evPtr, TCL_QUEUE_TAIL); @@ -654,7 +654,7 @@ ConsoleCloseProc( ckfree(consolePtr->writeBuf); consolePtr->writeBuf = 0; } - ckfree((char*) consolePtr); + ckfree(consolePtr); return errorCode; } @@ -810,7 +810,7 @@ ConsoleOutputProc( ckfree(infoPtr->writeBuf); } infoPtr->writeBufLen = toWrite; - infoPtr->writeBuf = ckalloc((size_t)toWrite); + infoPtr->writeBuf = ckalloc(toWrite); } memcpy(infoPtr->writeBuf, buf, (size_t)toWrite); infoPtr->toWrite = toWrite; @@ -1343,7 +1343,7 @@ TclWinOpenConsoleChannel( * See if a channel with this handle already exists. */ - infoPtr = (ConsoleInfo *) ckalloc((unsigned) sizeof(ConsoleInfo)); + infoPtr = ckalloc(sizeof(ConsoleInfo)); memset(infoPtr, 0, sizeof(ConsoleInfo)); infoPtr->validMask = permissions; |