summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.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/tkImage.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/tkImage.c')
-rw-r--r--generic/tkImage.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c
index ca818a3..31a2fa3 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -115,12 +115,12 @@ ImageTypeThreadExitProc(
while (tsdPtr->oldImageTypeList != NULL) {
freePtr = tsdPtr->oldImageTypeList;
tsdPtr->oldImageTypeList = tsdPtr->oldImageTypeList->nextPtr;
- ckfree((char *) freePtr);
+ ckfree(freePtr);
}
while (tsdPtr->imageTypeList != NULL) {
freePtr = tsdPtr->imageTypeList;
tsdPtr->imageTypeList = tsdPtr->imageTypeList->nextPtr;
- ckfree((char *) freePtr);
+ ckfree(freePtr);
}
}
@@ -158,7 +158,7 @@ Tk_CreateOldImageType(
tsdPtr->initialized = 1;
Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL);
}
- copyPtr = (Tk_ImageType *) ckalloc(sizeof(Tk_ImageType));
+ copyPtr = ckalloc(sizeof(Tk_ImageType));
*copyPtr = *typePtr;
copyPtr->nextPtr = tsdPtr->oldImageTypeList;
tsdPtr->oldImageTypeList = copyPtr;
@@ -179,7 +179,7 @@ Tk_CreateImageType(
tsdPtr->initialized = 1;
Tcl_CreateThreadExitHandler(ImageTypeThreadExitProc, NULL);
}
- copyPtr = (Tk_ImageType *) ckalloc(sizeof(Tk_ImageType));
+ copyPtr = ckalloc(sizeof(Tk_ImageType));
*copyPtr = *typePtr;
copyPtr->nextPtr = tsdPtr->imageTypeList;
tsdPtr->imageTypeList = copyPtr;
@@ -318,7 +318,7 @@ Tk_ImageObjCmd(
hPtr = Tcl_CreateHashEntry(&winPtr->mainPtr->imageTable, name, &isNew);
if (isNew) {
- masterPtr = (ImageMaster *) ckalloc(sizeof(ImageMaster));
+ masterPtr = ckalloc(sizeof(ImageMaster));
masterPtr->typePtr = NULL;
masterPtr->masterData = NULL;
masterPtr->width = masterPtr->height = 1;
@@ -363,7 +363,7 @@ Tk_ImageObjCmd(
if (oldimage) {
int i;
- args = (Tcl_Obj **) ckalloc((objc+1) * sizeof(char *));
+ args = ckalloc((objc+1) * sizeof(char *));
for (i = 0; i < objc; i++) {
args[i] = (Tcl_Obj *) Tcl_GetString(objv[i]);
}
@@ -375,13 +375,13 @@ Tk_ImageObjCmd(
EventuallyDeleteImage(masterPtr, 0);
Tcl_Release(masterPtr);
if (oldimage) {
- ckfree((char *) args);
+ ckfree(args);
}
return TCL_ERROR;
}
Tcl_Release(masterPtr);
if (oldimage) {
- ckfree((char *) args);
+ ckfree(args);
}
masterPtr->typePtr = typePtr;
for (imagePtr = masterPtr->instancePtr; imagePtr != NULL;
@@ -618,7 +618,7 @@ Tk_GetImage(
if (masterPtr->deleted) {
goto noSuchImage;
}
- imagePtr = (Image *) ckalloc(sizeof(Image));
+ imagePtr = ckalloc(sizeof(Image));
imagePtr->tkwin = tkwin;
imagePtr->display = Tk_Display(tkwin);
imagePtr->masterPtr = masterPtr;
@@ -681,7 +681,7 @@ Tk_FreeImage(
}
prevPtr->nextPtr = imagePtr->nextPtr;
}
- ckfree((char *) imagePtr);
+ ckfree(imagePtr);
/*
* If there are no more instances left for the master, and if the master
@@ -693,7 +693,7 @@ Tk_FreeImage(
Tcl_DeleteHashEntry(masterPtr->hPtr);
}
Tcl_Release(masterPtr->winPtr);
- ckfree((char *) masterPtr);
+ ckfree(masterPtr);
}
}
@@ -970,7 +970,7 @@ DeleteImage(
Tcl_DeleteHashEntry(masterPtr->hPtr);
}
Tcl_Release(masterPtr->winPtr);
- ckfree((char *) masterPtr);
+ ckfree(masterPtr);
} else {
masterPtr->deleted = 1;
}