diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 17:45:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 17:45:37 (GMT) |
commit | a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9 (patch) | |
tree | 08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkTextWind.c | |
parent | d27c3b360cd9cb780be362ed6ce435776ca42fc1 (diff) | |
download | tk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.zip tk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.tar.gz tk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.tar.bz2 |
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r-- | generic/tkTextWind.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index 8c032c6..e3894fc 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -288,7 +288,7 @@ TkTextWindowCmd( * Create the new window segment and initialize it. */ - ewPtr = (TkTextSegment *) ckalloc(EW_SEG_SIZE); + ewPtr = ckalloc(EW_SEG_SIZE); ewPtr->typePtr = &tkTextEmbWindowType; ewPtr->size = 1; ewPtr->body.ew.sharedTextPtr = textPtr->sharedTextPtr; @@ -300,8 +300,7 @@ TkTextWindowCmd( ewPtr->body.ew.stretch = 0; ewPtr->body.ew.optionTable = Tk_CreateOptionTable(interp, optionSpecs); - client = (TkTextEmbWindowClient *) - ckalloc(sizeof(TkTextEmbWindowClient)); + client = ckalloc(sizeof(TkTextEmbWindowClient)); client->next = NULL; client->textPtr = textPtr; client->tkwin = NULL; @@ -459,8 +458,7 @@ EmbWinConfigure( * Have to make the new client. */ - client = (TkTextEmbWindowClient *) - ckalloc(sizeof(TkTextEmbWindowClient)); + client = ckalloc(sizeof(TkTextEmbWindowClient)); client->next = ewPtr->body.ew.clients; client->textPtr = textPtr; client->tkwin = NULL; @@ -642,7 +640,7 @@ EmbWinLostSlaveProc( } loop->next = client->next; } - ckfree((char *) client); + ckfree(client); index.tree = ewPtr->body.ew.sharedTextPtr->tree; index.linePtr = ewPtr->body.ew.linePtr; @@ -708,7 +706,7 @@ TkTextWinFreeClient( * Free up this client. */ - ckfree((char *) client); + ckfree(client); } /* @@ -762,7 +760,7 @@ EmbWinDeleteProc( * Free up all memory allocated. */ - ckfree((char *) ewPtr); + ckfree(ewPtr); return 0; } @@ -947,8 +945,7 @@ EmbWinLayoutProc( * now need to add to our client list. */ - client = (TkTextEmbWindowClient *) - ckalloc(sizeof(TkTextEmbWindowClient)); + client = ckalloc(sizeof(TkTextEmbWindowClient)); client->next = ewPtr->body.ew.clients; client->textPtr = textPtr; client->tkwin = NULL; |