gcc/ada/
* g-socket.ads, g-socket.adb (Get_Address): Make Stream a
"not null" parameter.
From-SVN: r134386
+2008-04-17 Samuel Tardieu <sam@rfc1149.net>
+
+ * g-socket.ads, g-socket.adb (Get_Address): Make Stream a
+ "not null" parameter.
+
2008-04-17 Samuel Tardieu <sam@rfc1149.net>
* g-socket.adb: Add a message "IPv6 not supported" to the
-- Get_Address --
-----------------
- function Get_Address (Stream : Stream_Access) return Sock_Addr_Type is
+ function Get_Address
+ (Stream : not null Stream_Access) return Sock_Addr_Type
+ is
begin
- if Stream = null then
- raise Socket_Error;
- elsif Stream.all in Datagram_Socket_Stream_Type then
+ if Stream.all in Datagram_Socket_Stream_Type then
return Datagram_Socket_Stream_Type (Stream.all).From;
else
return Get_Peer_Name (Stream_Socket_Stream_Type (Stream.all).Socket);
-- Create a stream associated with a datagram-based socket that is already
-- bound. Send_To is the socket address to which messages are being sent.
- function Get_Address (Stream : Stream_Access) return Sock_Addr_Type;
+ function Get_Address
+ (Stream : not null Stream_Access) return Sock_Addr_Type;
-- Return the socket address from which the last message was received
procedure Free is new Ada.Unchecked_Deallocation