]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/src/terminal_interface-curses-menus-item_user_data.adb
ncurses 6.2 - patch 20200627
[ncurses.git] / Ada95 / src / terminal_interface-curses-menus-item_user_data.adb
index eb06d096dfb274b517011a4b9f3051c229ec050f..6374376b7e349b55c7f635d20fb4ea1480390063 100644 (file)
@@ -7,7 +7,8 @@
 --                                 B O D Y                                  --
 --                                                                          --
 ------------------------------------------------------------------------------
--- Copyright (c) 1998-2003,2009 Free Software Foundation, Inc.              --
+-- Copyright 2018,2020 Thomas E. Dickey                                     --
+-- Copyright 1999-2009,2014 Free Software Foundation, Inc.                  --
 --                                                                          --
 -- Permission is hereby granted, free of charge, to any person obtaining a  --
 -- copy of this software and associated documentation files (the            --
 ------------------------------------------------------------------------------
 --  Author:  Juergen Pfeifer, 1996
 --  Version Control:
---  $Revision: 1.12 $
+--  $Revision: 1.16 $
 --  Binding Version 01.00
 ------------------------------------------------------------------------------
-with Interfaces.C;
 with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux;
 
 package body Terminal_Interface.Curses.Menus.Item_User_Data is
 
-   use type Interfaces.C.int;
-
    procedure Set_User_Data (Itm  : Item;
                             Data : User_Access)
    is
       function Set_Item_Userptr (Itm  : Item;
-                                 Addr : User_Access)  return C_Int;
+                                 Addr : User_Access)  return Eti_Error;
       pragma Import (C, Set_Item_Userptr, "set_item_userptr");
 
-      Res : constant Eti_Error := Set_Item_Userptr (Itm, Data);
    begin
-      if  Res /= E_Ok then
-         Eti_Exception (Res);
-      end if;
+      Eti_Exception (Set_Item_Userptr (Itm, Data));
    end Set_User_Data;
 
    function Get_User_Data (Itm  : Item) return User_Access