From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: bkey1@tampabay.rr.com Newsgroups: gmane.emacs.devel Subject: Re: Fix for Emacs Crash Date: Thu, 7 Nov 2002 21:26:41 +0000 (UTC) Sender: emacs-devel-admin@gnu.org Message-ID: <200211072108.gA7L84CB017575@smtp-server1.tampabay.rr.com> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1036704401 3345 80.91.224.249 (7 Nov 2002 21:26:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 7 Nov 2002 21:26:41 +0000 (UTC) Cc: Emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 189uAg-0000rg-00 for ; Thu, 07 Nov 2002 22:26:38 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 189uJq-0002mQ-00 for ; Thu, 07 Nov 2002 22:36:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 189u9H-000634-00; Thu, 07 Nov 2002 16:25:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 189tso-00014H-00 for emacs-devel@gnu.org; Thu, 07 Nov 2002 16:08:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 189tsl-00013E-00 for emacs-devel@gnu.org; Thu, 07 Nov 2002 16:08:09 -0500 Original-Received: from smtp-server1.tampabay.rr.com ([65.32.1.34]) by monty-python.gnu.org with esmtp (Exim 4.10) id 189tsk-00011v-00; Thu, 07 Nov 2002 16:08:06 -0500 Original-Received: from Debug (webmail.tampabay.rr.com [65.32.1.36]) by smtp-server1.tampabay.rr.com (8.12.2/8.12.2) with SMTP id gA7L84CB017575; Thu, 7 Nov 2002 16:08:04 -0500 (EST) Original-To: Jason Rumney X-Posting-IP: 209.101.206.131 X-Mailer: Endymion MailMan Standard Edition v3.2.9 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9240 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9240 Jason Rumney [mailto:jasonr@gnu.org] wrote: > > + set_menu_item_info ( > > + menu, > > + item != NULL ? (UINT) item : (UINT) wv->call_data, > > + item != NULL ? FALSE : TRUE, > > + &info); > > * I interpreted the line > > item != NULL ? (UINT) item : (UINT) wv->call_data, > > to mean if item is not NULL, use the specified menu identifier, otherwise > > use the position specified by the call_data member of the wv structure. > > I don't think call_data specifies a position, but it may be by chance > that things work correctly in many cases where item == NULL by > assuming it does. > > You will have to figure out what wv->call_data and item represent by > studying the rest of the code. My memory is sketchy, but I think that > item can be NULL for menu titles and separator lines. In the title > case, wv->call_data might be NULL as well, so your modified code does > the right thing even though the assumptions behind it are wrong, > since titles are at position 0. But I am not sure what happens in the > separator case. The line item != NULL ? (UINT) item : (UINT) wv->call_data, was part of the original code. That is what lead me to come to the conclusions I made about the role of wv->call_data. However, I will do some further debugging tonight to determine if these conclusions are correct.