Wireshark mailing list archives
Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c
From: Martin Mathieson <martin.r.mathieson () googlemail com>
Date: Fri, 14 Oct 2011 17:04:20 +0100
On Fri, Oct 14, 2011 at 4:37 PM, Tony Trinh <tony19 () gmail com> wrote:
Hi Martin/Anders, Actually, the valid #define for Lua code throughout Wireshark is HAVE_LUA_5_1 (not HAVE_LUA). HAVE_LUA works in Windows but not other OS's (such as OSX). But I do like HAVE_LUA better than a version-specific name because I imagine these names will have to be updated upon switching to newer versions of Lua, especially with 5.2 coming soon (unless there's some version incompatibility). Given that its only called from merge_lua_menu_items(), mightmake_menu_items() be too generic a function name?It's really named "make_menu_actions()". I named the function based on what it does, not based on who calls it. That function (and make_menu_xml()) can easily be used outside the context of Lua menus, and there's nothing about them that fundamentally binds them to Lua. That said, it doesn't matter enough to me if their names include the word "lua" since they might change at a later point when someone sees wider use for them. -Tony
Here is the checkin comment (r39424): Make make_menu_actions() static again, but protect with #ifdef HAVE_LUA_5_1 #endif As per discission on wireshark-dev, this function might later see wider use, so don't add 'lua' to the function name. Martin
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Guy Harris (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Martin Mathieson (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Anders Broman (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Tony Trinh (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Martin Mathieson (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Guy Harris (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Tony Trinh (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Anders Broman (Oct 14)
- Re: [Wireshark-commits] rev 39422: /trunk/gtk/ /trunk/gtk/: main_menubar.c Martin Mathieson (Oct 14)