Skip to content

Commit

Permalink
Windows: sockets sizes are euqal, comment removed
Browse files Browse the repository at this point in the history
  • Loading branch information
denizzzka committed Oct 12, 2022
1 parent ac81db4 commit 16464f1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/dpq2/connection.d
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,7 @@ class Connection
/// duplicate of internal posix socket will be used.
Socket socket()
{
/*
* Especially for Win32:
* Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because
* the value constitutes an index in per-process table of limited size
* and not a real pointer.
*/
version(Windows) static assert(SOCKET.sizeof == socket_t.sizeof);

return new Socket(cast(socket_t) posixSocketDuplicate, AddressFamily.UNSPEC);
}
Expand Down

0 comments on commit 16464f1

Please sign in to comment.