summaryrefslogtreecommitdiffstats
path: root/generic/tkImage.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-26 09:24:56 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-10-26 09:24:56 (GMT)
commitc25f08d8cfc7cf44411145cc13f3d201bb9fbf86 (patch)
treea15cd89ae53dde7838588d24d9840624355c58a7 /generic/tkImage.c
parent7c6b2012e75a7c80f78d549fc54ba1613bcfa5cc (diff)
downloadtk-c25f08d8cfc7cf44411145cc13f3d201bb9fbf86.zip
tk-c25f08d8cfc7cf44411145cc13f3d201bb9fbf86.tar.gz
tk-c25f08d8cfc7cf44411145cc13f3d201bb9fbf86.tar.bz2
Make all Destroy??? functions match the Tcl_FreeProc signature. That will prevent compiler warnings in all thinkable situations.
Diffstat (limited to 'generic/tkImage.c')
-rw-r--r--generic/tkImage.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tkImage.c b/generic/tkImage.c
index 4291f33..dc120ca 100644
--- a/generic/tkImage.c
+++ b/generic/tkImage.c
@@ -86,7 +86,7 @@ static Tcl_ThreadDataKey dataKey;
*/
static void ImageTypeThreadExitProc(void *clientData);
-static void DeleteImage(void *blockPtr);
+static Tcl_FreeProc DeleteImage;
static void EventuallyDeleteImage(ImageModel *modelPtr,
int forgetImageHashNow);
@@ -406,7 +406,7 @@ Tk_ImageObjCmd(
if (modelPtr->deleted) {
goto alreadyDeleted;
}
- DeleteImage(modelPtr);
+ DeleteImage((char *)modelPtr);
}
break;
case IMAGE_NAMES:
@@ -958,7 +958,11 @@ Tk_DeleteImage(
static void
DeleteImage(
+#if TCL_MAJOR_VERSION > 8
void *blockPtr) /* Pointer to main data structure for image. */
+#else
+ char *blockPtr)
+#endif
{
Image *imagePtr;
Tk_ImageType *typePtr;