Eli Zaretskii <eliz@gnu.org> writes: >> From: Manuel Giraud <manuel@ledu-giraud.fr> >> Date: Wed, 16 Nov 2022 18:30:58 +0100 >> >> AFAIU, those items are stored as a flat array. So there are many usage >> of this magical "4" number in keyboard.c and *term.c to walk this array. >> >> So I guess my question is: could (should?) it not be done with a proper >> struct? Maybe it is historical or maybe I'm missing something? > > I'm not sure how you intended to use a C 'struct' in this case. > Menu-bar items is a Lisp vector, so how do you replace it with a C > struct and still allow Lisp to populate a menu? I suggest not trying to change the internal menu representation. As it is, it allows easily creating very deeply nested menus, and garbage collection of menu items "just works". When working on the Haiku port, I tried to represent the menu bar contents in some more intuitive format, which led to garbage collection issues and C stack overflows with somewhat deeply nested menus.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4