summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-08-28 18:13:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-08-28 18:13:34 (GMT)
commitb51f35134bc68f09e6e3b90ea0eda5f10775ed0f (patch)
tree97ad92d34864c36be5167ea8983168ad6dc3dc85 /generic/tkImgPhoto.c
parent31f745b32a4352b25433ed66d0b394d6d6907bac (diff)
downloadtk-b51f35134bc68f09e6e3b90ea0eda5f10775ed0f.zip
tk-b51f35134bc68f09e6e3b90ea0eda5f10775ed0f.tar.gz
tk-b51f35134bc68f09e6e3b90ea0eda5f10775ed0f.tar.bz2
* generic/tkImgPhoto.c: Changed TclStack* calls to ck* calls so that
we don't create new dependencies on Tcl internals. * unix/tkUnixPort.h: Removed #include of tclInt.h that has been * win/tkWinPort.h: disabled for three years. If we needed this we'd have noticed by now.
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 2007559..9644ecf 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -17,10 +17,9 @@
* Department of Computer Science,
* Australian National University.
*
- * RCS: @(#) $Id: tkImgPhoto.c,v 1.80 2008/08/25 17:19:43 dkf Exp $
+ * RCS: @(#) $Id: tkImgPhoto.c,v 1.81 2008/08/28 18:13:34 dgp Exp $
*/
-#include "tclInt.h"
#include "tkImgPhoto.h"
#include <ctype.h>
@@ -1668,7 +1667,7 @@ ImgPhotoConfigureMaster(
Tk_PhotoImageFormat *imageFormat;
const char **args;
- args = TclStackAlloc(interp, (objc + 1) * sizeof(char *));
+ args = (const char **) ckalloc((objc + 1) * sizeof(char *));
for (i = 0, j = 0; i < objc; i++,j++) {
args[j] = Tcl_GetStringFromObj(objv[i], &length);
if ((length > 1) && (args[j][0] == '-')) {
@@ -1678,7 +1677,7 @@ ImgPhotoConfigureMaster(
data = objv[i];
j--;
} else {
- TclStackFree(interp, args);
+ ckfree((char *) args);
Tcl_AppendResult(interp,
"value for \"-data\" missing", NULL);
return TCL_ERROR;
@@ -1689,7 +1688,7 @@ ImgPhotoConfigureMaster(
format = objv[i];
j--;
} else {
- TclStackFree(interp, args);
+ ckfree((char *) args);
Tcl_AppendResult(interp,
"value for \"-format\" missing", NULL);
return TCL_ERROR;
@@ -1727,10 +1726,10 @@ ImgPhotoConfigureMaster(
if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs,
j, args, (char *) masterPtr, flags) != TCL_OK) {
- TclStackFree(interp, args);
+ ckfree((char *) args);
goto errorExit;
}
- TclStackFree(interp, args);
+ ckfree((char *) args);
/*
* Regard the empty string for -file, -data or -format as the null value.
@@ -3698,8 +3697,7 @@ ImgStringWrite(
Tcl_DStringInit(&data);
if ((blockPtr->width > 0) && (blockPtr->height > 0)) {
- char *line = TclStackAlloc(interp,
- (unsigned) ((8 * blockPtr->width) + 2));
+ char *line = ckalloc((unsigned) ((8 * blockPtr->width) + 2));
int row, col;
for (row=0; row<blockPtr->height; row++) {
@@ -3715,7 +3713,7 @@ ImgStringWrite(
}
Tcl_DStringAppendElement(&data, line+1);
}
- TclStackFree(interp, line);
+ ckfree(line);
}
Tcl_DStringResult(interp, &data);
return TCL_OK;