summaryrefslogtreecommitdiffstats
path: root/generic/tkTextWind.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
commite0b895874d5fa39f6d4134b407e930b80ee3ecd7 (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkTextWind.c
parent77d7867fd5b20233f0fa9163bd8a44d2ac274b0e (diff)
downloadtk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.zip
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.gz
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.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.c17
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;