diff --git a/src/polyorb_hi-utils.adb b/src/polyorb_hi-utils.adb index 825cb0fe9be8327046bfb7a4ea1f0456a27cc9a9..24b192c8d046fc523e33e980517fd00d23208c87 100644 --- a/src/polyorb_hi-utils.adb +++ b/src/polyorb_hi-utils.adb @@ -59,8 +59,8 @@ package body PolyORB_HI.Utils is -- Swap_Bytes -- ---------------- - function Swap_Bytes (B : Interfaces.Integer_16) - return Interfaces.Integer_16 + function Swap_Bytes (B : Interfaces.Unsigned_16) + return Interfaces.Unsigned_16 is use System; begin @@ -86,7 +86,7 @@ package body PolyORB_HI.Utils is function Internal_Code (P : Port_Type) return Unsigned_16 is function To_Internal_Code is new Ada.Unchecked_Conversion - (Port_Type, Integer_16); + (Port_Type, Unsigned_16); begin return Swap_Bytes (To_Internal_Code (P)); end Internal_Code; @@ -95,9 +95,9 @@ package body PolyORB_HI.Utils is -- Corresponding_Port -- ------------------------ - function Corresponding_Port (I : Integer_16) return Port_Type is + function Corresponding_Port (I : Unsigned_16) return Port_Type is function To_Corresponding_Port is new Ada.Unchecked_Conversion - (Integer_16, Port_Type); + (Unsigned_16, Port_Type); begin return To_Corresponding_Port (Swap_Bytes (I)); end Corresponding_Port; diff --git a/src/polyorb_hi-utils.ads b/src/polyorb_hi-utils.ads index cbfe4da471c44608e7ce6bc3823a45b19f31ffe2..66cb4481a9ed3bf64b297221a54479004cbe2ce8 100644 --- a/src/polyorb_hi-utils.ads +++ b/src/polyorb_hi-utils.ads @@ -70,10 +70,10 @@ package PolyORB_HI.Utils is (Integer_8, Node_Type); function Internal_Code (P : Port_Type) return Unsigned_16; - function Corresponding_Port (I : Integer_16) return Port_Type; + function Corresponding_Port (I : Unsigned_16) return Port_Type; - function Swap_Bytes (B : Interfaces.Integer_16) - return Interfaces.Integer_16; + function Swap_Bytes (B : Interfaces.Unsigned_16) + return Interfaces.Unsigned_16; -- Swap bytes iff the host is little endian. This function is -- notionnally equivalent to htons().