summaryrefslogtreecommitdiffstats
path: root/generic/tkOldTest.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2011-03-12 17:45:37 (GMT)
committerdkf <dkf@noemail.net>2011-03-12 17:45:37 (GMT)
commitfcac358b90566b1486dcd5006660f6554407a5aa (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkOldTest.c
parentb3288baebce521001f60b872579018a4702115e4 (diff)
downloadtk-fcac358b90566b1486dcd5006660f6554407a5aa.zip
tk-fcac358b90566b1486dcd5006660f6554407a5aa.tar.gz
tk-fcac358b90566b1486dcd5006660f6554407a5aa.tar.bz2
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally. FossilOrigin-Name: 142e016e7b17277d81257da90477297eb9aaa05a
Diffstat (limited to 'generic/tkOldTest.c')
-rw-r--r--generic/tkOldTest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkOldTest.c b/generic/tkOldTest.c
index 05041b7..d87c68e 100644
--- a/generic/tkOldTest.c
+++ b/generic/tkOldTest.c
@@ -168,14 +168,14 @@ ImageCreate(
varName = argv[i+1];
}
- timPtr = (TImageMaster *) ckalloc(sizeof(TImageMaster));
+ timPtr = ckalloc(sizeof(TImageMaster));
timPtr->master = master;
timPtr->interp = interp;
timPtr->width = 30;
timPtr->height = 15;
- timPtr->imageName = (char *) ckalloc((unsigned) (strlen(name) + 1));
+ timPtr->imageName = ckalloc((unsigned) (strlen(name) + 1));
strcpy(timPtr->imageName, name);
- timPtr->varName = (char *) ckalloc((unsigned) (strlen(varName) + 1));
+ timPtr->varName = ckalloc((unsigned) (strlen(varName) + 1));
strcpy(timPtr->varName, varName);
Tcl_CreateCommand(interp, name, ImageCmd, timPtr, NULL);
*clientDataPtr = timPtr;
@@ -273,7 +273,7 @@ ImageGet(
Tcl_SetVar(timPtr->interp, timPtr->varName, buffer,
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
- instPtr = (TImageInstance *) ckalloc(sizeof(TImageInstance));
+ instPtr = ckalloc(sizeof(TImageInstance));
instPtr->masterPtr = timPtr;
instPtr->fg = Tk_GetColor(timPtr->interp, tkwin, "#ff0000");
gcValues.foreground = instPtr->fg->pixel;
@@ -364,7 +364,7 @@ ImageFree(
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
Tk_FreeColor(instPtr->fg);
Tk_FreeGC(display, instPtr->gc);
- ckfree((char *) instPtr);
+ ckfree(instPtr);
}
/*
@@ -400,7 +400,7 @@ ImageDelete(
Tcl_DeleteCommand(timPtr->interp, timPtr->imageName);
ckfree(timPtr->imageName);
ckfree(timPtr->varName);
- ckfree((char *) timPtr);
+ ckfree(timPtr);
}
/*