diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2023-03-11 09:39:15 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2023-03-11 09:39:15 +1300 |
commit | beaf98f79d691d0b67cadc1dee7f38a822f3f747 (patch) | |
tree | 5c7d1c27ae4ca17b2b2db26095581b55ff4b3d15 /src | |
parent | dec5d903cd88b06595cfeb1aee4fc56e06be0987 (diff) |
Empty extended return statements to get around weird dangling reference error
Diffstat (limited to 'src')
-rw-r--r-- | src/fltk-widgets-menus.adb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/fltk-widgets-menus.adb b/src/fltk-widgets-menus.adb index 817776e..d2bf2ff 100644 --- a/src/fltk-widgets-menus.adb +++ b/src/fltk-widgets-menus.adb @@ -435,7 +435,9 @@ package body FLTK.Widgets.Menus is begin Wrapper (This.My_Items (Place).all).Void_Ptr := fl_menu_get_item (This.Void_Ptr, Interfaces.C.int (Place) - 1); - return (Data => This.My_Items (Place)); + return R : FLTK.Menu_Items.Menu_Item_Reference := (Data => This.My_Items (Place)) do + null; + end return; end Item; @@ -460,7 +462,9 @@ package body FLTK.Widgets.Menus is end if; Wrapper (This.My_Items (Place).all).Void_Ptr := fl_menu_find_item (This.Void_Ptr, Interfaces.C.To_C (Name)); - return (Data => This.My_Items (Place)); + return R : FLTK.Menu_Items.Menu_Item_Reference := (Data => This.My_Items (Place)) do + null; + end return; end Find_Item; @@ -476,7 +480,9 @@ package body FLTK.Widgets.Menus is end if; Wrapper (This.My_Items (Place).all).Void_Ptr := fl_menu_find_item2 (This.Void_Ptr, Callback_Convert.To_Address (Action)); - return (Data => This.My_Items (Place)); + return R : FLTK.Menu_Items.Menu_Item_Reference := (Data => This.My_Items (Place)) do + null; + end return; end Find_Item; @@ -590,7 +596,9 @@ package body FLTK.Widgets.Menus is raise No_Reference; end if; Wrapper (This.My_Items (Place).all).Void_Ptr := fl_menu_mvalue (This.Void_Ptr); - return (Data => This.My_Items (Place)); + return R : FLTK.Menu_Items.Menu_Item_Reference := (Data => This.My_Items (Place)) do + null; + end return; end Chosen; |