summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-04-03 13:44:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-04-03 13:44:31 (GMT)
commitb0cd51815168b6c4d8fa61c00eb931f865ee03ec (patch)
tree41b25b66c8481b455d2803d1367ecd067cf02310 /generic
parent6c3188baaf39b816f6804c3d57cb70368384cab0 (diff)
downloadtk-b0cd51815168b6c4d8fa61c00eb931f865ee03ec.zip
tk-b0cd51815168b6c4d8fa61c00eb931f865ee03ec.tar.gz
tk-b0cd51815168b6c4d8fa61c00eb931f865ee03ec.tar.bz2
Restore selected code improvements that missed the 8.5.14 release.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkCmds.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index e9c6401..2010b6e 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -232,7 +232,7 @@ TkBindEventProc(
ClientData objects[MAX_OBJS], *objPtr;
TkWindow *topLevPtr;
int i, count;
- char *p;
+ const char *p;
Tcl_HashEntry *hPtr;
if ((winPtr->mainPtr == NULL) || (winPtr->mainPtr->bindingTable == NULL)) {
@@ -251,7 +251,7 @@ TkBindEventProc(
(winPtr->numTags * sizeof(ClientData)));
}
for (i = 0; i < winPtr->numTags; i++) {
- p = (char *) winPtr->tagPtr[i];
+ p = winPtr->tagPtr[i];
if (*p == '.') {
hPtr = Tcl_FindHashEntry(&winPtr->mainPtr->nameTable, p);
if (hPtr != NULL) {
@@ -327,7 +327,6 @@ Tk_BindtagsObjCmd(
}
if (objc == 2) {
listPtr = Tcl_NewObj();
- Tcl_IncrRefCount(listPtr);
if (winPtr->numTags == 0) {
Tcl_ListObjAppendElement(interp, listPtr,
Tcl_NewStringObj(winPtr->pathName, -1));
@@ -350,7 +349,6 @@ Tk_BindtagsObjCmd(
}
}
Tcl_SetObjResult(interp, listPtr);
- Tcl_DecrRefCount(listPtr);
return TCL_OK;
}
if (winPtr->tagPtr != NULL) {
@@ -411,10 +409,10 @@ TkFreeBindingTags(
TkWindow *winPtr) /* Window whose tags are to be released. */
{
int i;
- char *p;
+ const char *p;
for (i = 0; i < winPtr->numTags; i++) {
- p = (char *) (winPtr->tagPtr[i]);
+ p = winPtr->tagPtr[i];
if (*p == '.') {
/*
* Names starting with "." are malloced rather than Uids, so they
@@ -1503,9 +1501,7 @@ Tk_WinfoObjCmd(
Tcl_SetStringObj(resultPtr, Tk_PathName(tkwin), -1);
}
break;
- case WIN_INTERPS: {
- int result;
-
+ case WIN_INTERPS:
skip = TkGetDisplayOf(interp, objc - 2, objv + 2, &tkwin);
if (skip < 0) {
return TCL_ERROR;
@@ -1514,9 +1510,7 @@ Tk_WinfoObjCmd(
Tcl_WrongNumArgs(interp, 2, objv, "?-displayof window?");
return TCL_ERROR;
}
- result = TkGetInterpNames(interp, tkwin);
- return result;
- }
+ return TkGetInterpNames(interp, tkwin);
case WIN_PATHNAME: {
Window id;