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/tkImage.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/tkImage.c')
-rw-r--r-- | generic/tkImage.c | 24 |
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; } |