From ec867797797c80ba00a29af18fb9c38f137a0a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Mon, 30 Aug 2004 20:14:21 +0000 Subject: [PATCH] Don't call ENCODE_MENU_STRING on top level menu names, GC may occur. --- src/ChangeLog | 3 +-- src/xmenu.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index b761d28b29e..8d441748ffd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,8 +4,7 @@ instead of name and key. (update_submenu_strings): New function. (set_frame_menubar): Remove call to inhibit_garbage_collection, - call update_submenu_strings. Call ENCODE_MENU_STRING for top level - menu names. + call update_submenu_strings. * gtkutil.h (_widget_value): Added lname and lkey. diff --git a/src/xmenu.c b/src/xmenu.c index 2eed2b4987e..229f9c37de7 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2056,7 +2056,7 @@ set_frame_menubar (f, first_time, deep_p) string = XVECTOR (items)->contents[i + 1]; if (NILP (string)) break; - wv->name = (char *) SDATA (ENCODE_MENU_STRING (string)); + wv->name = (char *) SDATA (string); update_submenu_strings (wv->contents); wv = wv->next; } @@ -2088,7 +2088,7 @@ set_frame_menubar (f, first_time, deep_p) break; wv = xmalloc_widget_value (); - wv->name = (char *) SDATA (ENCODE_MENU_STRING (string)); + wv->name = (char *) SDATA (string); wv->value = 0; wv->enabled = 1; wv->button_type = BUTTON_TYPE_NONE; -- 2.39.5