mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-31 03:03:35 -07:00
Don't call record_unwind_protect_ptr with a GCed pointer
* src/xmenu.c (create_and_show_popup_menu): Use record_unwind_protect instead of record_unwind_protect_ptr. (leave_toolkit_menu): Use a Lisp_Object instead of a untagged pointer.
This commit is contained in:
parent
f536751c7a
commit
3fbf4dc9ac
1 changed files with 5 additions and 4 deletions
|
|
@ -1661,16 +1661,16 @@ prepare_for_entry_into_toolkit_menu (struct frame *f)
|
|||
}
|
||||
|
||||
static void
|
||||
leave_toolkit_menu (void *data)
|
||||
leave_toolkit_menu (Lisp_Object frame)
|
||||
{
|
||||
XIEventMask mask;
|
||||
ptrdiff_t l = XIMaskLen (XI_LASTEVENT);
|
||||
unsigned char *m;
|
||||
Lisp_Object tail, frame;
|
||||
Lisp_Object tail;
|
||||
struct x_display_info *dpyinfo;
|
||||
struct frame *f;
|
||||
|
||||
dpyinfo = FRAME_DISPLAY_INFO ((struct frame *) data);
|
||||
dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame));
|
||||
|
||||
if (!dpyinfo->supports_xi2)
|
||||
return;
|
||||
|
|
@ -1876,7 +1876,8 @@ create_and_show_popup_menu (struct frame *f, widget_value *first_wv,
|
|||
|
||||
record_unwind_protect_int (pop_down_menu, (int) menu_id);
|
||||
#ifdef HAVE_XINPUT2
|
||||
record_unwind_protect_ptr (leave_toolkit_menu, f);
|
||||
record_unwind_protect (leave_toolkit_menu,
|
||||
make_lisp_ptr (f, Lisp_Vectorlike));
|
||||
#endif
|
||||
|
||||
/* Process events that apply to the menu. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue