|
-
November 12th, 2011, 02:31 PM
#1
Why is winapi so messy?
I used WinSock2 a bit and it's just horrible how they can't even use types consistently. I'll bring a few examples.
int connect(SOCKET s, const struct sockaddr *name, int namelen);
Why is namelen an int when the ai_addrlen field of addrinfo is size_t?
int setsockopt(SOCKET s, int level, int optname, const char *optval, int optlen);
Why is optval char* and not void*? And again why is optlen not unsigned?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|