unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jason Rumney <jasonr@gnu.org>
Cc: "Emacs-Devel (E-mail)" <emacs-devel@gnu.org>,
	"Gnu-Emacs-Sources (E-mail)" <gnu-emacs-sources@gnu.org>
Subject: Re: Fix for Emacs Crash
Date: 07 Nov 2002 19:47:57 +0000	[thread overview]
Message-ID: <m28z05go0i.fsf@nyaumo.btinternet.com> (raw)
In-Reply-To: <002101c28612$e1e15710$6501a8c0@GODDESS>

"Ben Key" <Bkey1@tampabay.rr.com> writes:

> +    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.

> * Based upon this interpretation, passing SetMenuItemInfo a value of FALSE
> for the fByPosition parameter unconditionally is obviously incorrect.
> Instead fByPosition should only be FALSE if item is non NULL.

I think this part of your interpretation is correct.

Thanks for tracking this down.

  reply	other threads:[~2002-11-07 19:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07  4:05 Fix for Emacs Crash Ben Key
2002-11-07 19:47 ` Jason Rumney [this message]
2002-11-07 20:28   ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2002-11-07 21:26 bkey1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m28z05go0i.fsf@nyaumo.btinternet.com \
    --to=jasonr@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=gnu-emacs-sources@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).