g-socket.ads, [...] (Get_Address): Make Stream a "not null" parameter.
gcc/ada/ * g-socket.ads, g-socket.adb (Get_Address): Make Stream a "not null" parameter. From-SVN: r134386
This commit is contained in:
parent
111c1cd945
commit
35485e124c
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -763,11 +763,11 @@ package body GNAT.Sockets is
|
||||
-- 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);
|
||||
|
@ -900,7 +900,8 @@ package GNAT.Sockets is
|
||||
-- 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
|
||||
|
Loading…
Reference in New Issue
Block a user