summaryrefslogtreecommitdiffstats
path: root/generic/tkOldTest.c
diff options
context:
space:
mode:
authordonal.k.fellows@manchester.ac.uk <dkf>2011-03-12 17:45:37 (GMT)
committerdonal.k.fellows@manchester.ac.uk <dkf>2011-03-12 17:45:37 (GMT)
commit01f9bb4228900974fc5be41c7117d7760c1816f4 (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkOldTest.c
parentca4f88869d17514775a321f868872f5411d2d4fa (diff)
downloadtk-01f9bb4228900974fc5be41c7117d7760c1816f4.zip
tk-01f9bb4228900974fc5be41c7117d7760c1816f4.tar.gz
tk-01f9bb4228900974fc5be41c7117d7760c1816f4.tar.bz2
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
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);
}
/*