Wireshark-dev: Re: [Wireshark-dev] compile warning/error on current svn (make_menu_actions)
-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: den 14 oktober 2011 11:09
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] compile warning/error on current svn (make_menu_actions)
On Oct 14, 2011, at 1:46 AM, Martin Kaiser wrote:
>> Should we have #ifdef HAVE_LUA_5_1 around the function definition as
>> well?
>
>Speaking of that, why is this dependent on the Lua *version*? Do we not support adding menu items with earlier versions of Lua?
Proposed patch - untested
Index: main_menubar.c
===================================================================
--- main_menubar.c (revision 913)
+++ main_menubar.c (working copy)
@@ -3694,6 +3694,8 @@
* Creates an action group for the menu items in xpath, and returns it. The cal
ler should
* use g_object_unref() on the returned pointer if transferring scope.
*/
+#ifdef HAVE_LUA
+/* NOTE currently only used from Lua, remove this ifdef when used outside of #i
fdef LUA */
static GtkActionGroup*
make_menu_actions(const char *path, const menu_item_t *menu_item_data) {
GtkActionGroup *action_group;
@@ -3775,11 +3777,11 @@
return action_group;
}
-
+#endif
static void
merge_lua_menu_items(GList *merge_lua_menu_items_list _U_)
{
-#ifdef HAVE_LUA_5_1
+#ifdef HAVE_LUA
guint merge_id;
GtkActionGroup *action_group;
menu_item_t *menu_item_data;
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe