From 901d7c12a89335301776da04b7616f83cf1d2842 Mon Sep 17 00:00:00 2001 From: dkf Date: Fri, 3 Sep 2004 14:09:04 +0000 Subject: Make sure user_data is NULL everywhere it isn't set. [Bug 1021812] --- ChangeLog | 9 +++++++++ macosx/tkMacOSXMenu.c | 3 ++- macosx/tkMacOSXMenus.c | 5 +++-- win/tkWinMenu.c | 3 ++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a5101a..69e53a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-09-03 Donal K. Fellows + + * macosx/tkMacOSXMenus.c (GenerateEditEvent): + * macosx/tkMacOSXMenu.c (MenuSelectEvent): + * win/tkWinMenu.c (MenuSelectEvent): Make sure everywhere that + needs to NULL-out the user_data field does actually do so. (Code + that uses bzero() or memset() for the task just needs to be + rebuilt to work.) [Bug 1021812] + 2004-09-01 Donal K. Fellows * tests/bind.test (bind-22.163): Fix inadvertent minor breakage diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index b83bc51..7ad48b4 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.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: tkMacOSXMenu.c,v 1.14 2004/07/20 11:49:16 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.15 2004/09/03 14:09:05 dkf Exp $ */ #include "tkMacOSXInt.h" #include "tkMenubutton.h" @@ -3683,6 +3683,7 @@ MenuSelectEvent( event.state = TkMacOSXButtonKeyState(); event.same_screen = true; event.name = Tk_GetUid("MenuSelect"); + event.user_data = NULL; Tk_QueueWindowEvent((XEvent *) &event, TCL_QUEUE_TAIL); } diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index a24f880..117a298 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.5 2004/04/01 18:33:30 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.6 2004/09/03 14:09:05 dkf Exp $ */ #include "tk.h" @@ -254,7 +254,8 @@ GenerateEditEvent( event.y_root = where.v; event.state = TkMacOSXButtonKeyState(); event.same_screen = true; - + event.user_data = NULL; + switch (flag) { case EDIT_CUT: event.name = Tk_GetUid("Cut"); diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 58cc781..ad55904 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.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: tkWinMenu.c,v 1.34 2004/08/25 22:23:33 dgp Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.35 2004/09/03 14:09:05 dkf Exp $ */ #define OEMRESOURCE @@ -2812,6 +2812,7 @@ MenuSelectEvent( event.state = TkWinGetModifierState(); event.same_screen = 1; event.name = Tk_GetUid("MenuSelect"); + event.user_data = NULL; Tk_QueueWindowEvent((XEvent *) &event, TCL_QUEUE_TAIL); } -- cgit v0.12