diff options
-rw-r--r-- | ChangeLog | 21 | ||||
-rw-r--r-- | generic/tkConfig.c | 6 |
2 files changed, 17 insertions, 10 deletions
@@ -1,3 +1,8 @@ +2005-10-10 Jeff Hobbs <jeffh@ActiveState.com> + + * generic/tkConfig.c (Tk_DeleteOptionTable, Tk_CreateOptionTable): + properly alloc/delete one more option. [Bug 1319720] (melbardis) + 2005-10-10 Pat Thoyts <patthoyts@users.sourceforge.net> * tests/winfo.test: Wait until child window is visible @@ -26,11 +31,12 @@ process is in front on MouseDown, otherwise request process activation from BringWindowForward() via new isFrontProcess param. - * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): register our - event handler on the dispatcher target for all carbon events of interest - to TkAqua; this replaces event processing directly from the event queue - and thus allows to capture events that are syntesized by Carbon and sent - directly to the dispatcher and not to the event queue. + * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): + register our event handler on the dispatcher target for all carbon + events of interest to TkAqua; this replaces event processing + directly from the event queue and thus allows to capture events + that are syntesized by Carbon and sent directly to the dispatcher + and not to the event queue. * macosx/tkMacOSXEvent.c: remove TkMacOSXCountAndProcessMacEvents(), rename ReceiveAndProcessEvent() to TkMacOSXReceiveAndProcessEvent(). @@ -39,8 +45,9 @@ processed in our dispatcher target event handler. * macosx/tkMacOSXNotify.c (CarbonEventsCheckProc): dispatch events - directly via TkMacOSXReceiveAndProcessEvent(), but dispatch no more than - four carbon events at one time to avoid starving other event sources. + directly via TkMacOSXReceiveAndProcessEvent(), but dispatch no + more than four carbon events at one time to avoid starving other + event sources. * macosx/tkMacOSXEvent.c: formatting cleanup, move XSync() to XStubs, * macosx/tkMacOSXEvent.h: removed obsolete kEventClassWish handling. diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 124c452..da39158 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkConfig.c,v 1.18.2.1 2005/08/11 12:17:09 dkf Exp $ + * RCS: @(#) $Id: tkConfig.c,v 1.18.2.2 2005/10/10 21:22:17 hobbs Exp $ */ /* @@ -226,7 +226,7 @@ Tk_CreateOptionTable(interp, templatePtr) numOptions++; } tablePtr = (OptionTable *) (ckalloc(sizeof(OptionTable) - + ((numOptions - 1) * sizeof(Option)))); + + (numOptions * sizeof(Option)))); tablePtr->refCount = 1; tablePtr->hashEntryPtr = hashEntryPtr; tablePtr->nextPtr = NULL; @@ -354,7 +354,7 @@ Tk_DeleteOptionTable(optionTable) Tk_DeleteOptionTable((Tk_OptionTable) tablePtr->nextPtr); } - for (count = tablePtr->numOptions - 1, optionPtr = tablePtr->options; + for (count = tablePtr->numOptions, optionPtr = tablePtr->options; count > 0; count--, optionPtr++) { if (optionPtr->defaultPtr != NULL) { Tcl_DecrRefCount(optionPtr->defaultPtr); |