diff options
author | dkf <dkf@noemail.net> | 2011-03-12 15:06:47 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2011-03-12 15:06:47 (GMT) |
commit | dd3a8a349837409f90ccabcc9aef092197d4da6f (patch) | |
tree | ed891ab3e00ea5888426f25d675aff2d89a00b1d /generic/tclIOCmd.c | |
parent | 3bc57329cfbbd1026bf237979f491e7336f26c15 (diff) | |
download | tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.zip tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.tar.gz tcl-dd3a8a349837409f90ccabcc9aef092197d4da6f.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.
FossilOrigin-Name: 5574bdd262b2672cde48771787370c12854cecf4
Diffstat (limited to 'generic/tclIOCmd.c')
-rw-r--r-- | generic/tclIOCmd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c index abbe002..1f0e4a9 100644 --- a/generic/tclIOCmd.c +++ b/generic/tclIOCmd.c @@ -1168,7 +1168,7 @@ Tcl_OpenObjCmd( Tcl_SetChannelOption(interp, chan, "-translation", "binary"); } } - ckfree((char *) cmdArgv); + ckfree(cmdArgv); } if (chan == NULL) { return TCL_ERROR; @@ -1217,7 +1217,7 @@ TcpAcceptCallbacksDeleteProc( acceptCallbackPtr->interp = NULL; } Tcl_DeleteHashTable(hTblPtr); - ckfree((char *) hTblPtr); + ckfree(hTblPtr); } /* @@ -1257,7 +1257,7 @@ RegisterTcpServerInterpCleanup( hTblPtr = Tcl_GetAssocData(interp, "tclTCPAcceptCallbacks", NULL); if (hTblPtr == NULL) { - hTblPtr = (Tcl_HashTable *) ckalloc((unsigned) sizeof(Tcl_HashTable)); + hTblPtr = ckalloc(sizeof(Tcl_HashTable)); Tcl_InitHashTable(hTblPtr, TCL_ONE_WORD_KEYS); Tcl_SetAssocData(interp, "tclTCPAcceptCallbacks", TcpAcceptCallbacksDeleteProc, hTblPtr); @@ -1425,7 +1425,7 @@ TcpServerCloseProc( acceptCallbackPtr); } Tcl_EventuallyFree(acceptCallbackPtr->script, TCL_DYNAMIC); - ckfree((char *) acceptCallbackPtr); + ckfree(acceptCallbackPtr); } /* @@ -1561,8 +1561,8 @@ Tcl_SocketObjCmd( } if (server) { - AcceptCallback *acceptCallbackPtr = (AcceptCallback *) - ckalloc((unsigned) sizeof(AcceptCallback)); + AcceptCallback *acceptCallbackPtr = + ckalloc(sizeof(AcceptCallback)); unsigned len = strlen(script) + 1; char *copyScript = ckalloc(len); @@ -1573,7 +1573,7 @@ Tcl_SocketObjCmd( acceptCallbackPtr); if (chan == NULL) { ckfree(copyScript); - ckfree((char *) acceptCallbackPtr); + ckfree(acceptCallbackPtr); return TCL_ERROR; } |