diff options
author | dgp <dgp@users.sourceforge.net> | 2017-05-08 16:39:34 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-05-08 16:39:34 (GMT) |
commit | 5933c912e0ca328f932a7570535db8530736a88a (patch) | |
tree | bcfb4aa7204b3a5bcf399bc0a2b44db13f40efef /generic | |
parent | 1d8d022bbb6e739c99c55a2473ce5ada2cf61192 (diff) | |
parent | 39dd1134f379cf247b40c74d68ea6bec62edb33e (diff) | |
download | tk-5933c912e0ca328f932a7570535db8530736a88a.zip tk-5933c912e0ca328f932a7570535db8530736a88a.tar.gz tk-5933c912e0ca328f932a7570535db8530736a88a.tar.bz2 |
merge 8.6
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkGC.c | 7 | ||||
-rw-r--r-- | generic/tkSelect.c | 4 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 2 |
3 files changed, 3 insertions, 10 deletions
diff --git a/generic/tkGC.c b/generic/tkGC.c index 5663ede..c424e30 100644 --- a/generic/tkGC.c +++ b/generic/tkGC.c @@ -314,7 +314,6 @@ Tk_FreeGC( gcPtr = Tcl_GetHashValue(idHashPtr); gcPtr->refCount--; if (gcPtr->refCount == 0) { - Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc)); XFreeGC(gcPtr->display, gcPtr->gc); Tcl_DeleteHashEntry(gcPtr->valueHashPtr); Tcl_DeleteHashEntry(idHashPtr); @@ -351,12 +350,6 @@ TkGCCleanup( entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) { gcPtr = Tcl_GetHashValue(entryPtr); - /* - * This call is not needed, as it is only used on Unix to restore the - * Id to the stack pool, and we don't want to use them anymore. - * Tk_FreeXId(gcPtr->display, (XID) XGContextFromGC(gcPtr->gc)); - */ - XFreeGC(gcPtr->display, gcPtr->gc); Tcl_DeleteHashEntry(gcPtr->valueHashPtr); Tcl_DeleteHashEntry(entryPtr); diff --git a/generic/tkSelect.c b/generic/tkSelect.c index ab9018a..d763411 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -190,8 +190,8 @@ Tk_CreateSelHandler( * should make a copy for this selPtr. */ - unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) + - ((CommandInfo *)clientData)->cmdLength + 1; + unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) + 1 + + ((CommandInfo *)clientData)->cmdLength; selPtr->clientData = ckalloc(cmdInfoLen); memcpy(selPtr->clientData, clientData, cmdInfoLen); diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 371e910..03d11e1 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -7561,7 +7561,7 @@ TkTextCharLayoutProc( ciPtr = &bciPtr->ci; } else { bciPtr = baseCharChunkPtr->clientData; - ciPtr = ckalloc(sizeof(CharInfo)); + ciPtr = ckalloc(Tk_Offset(CharInfo, chars) + 1); baseString = &bciPtr->baseChars; } |