-
-
Notifications
You must be signed in to change notification settings - Fork 740
std.socket cleanup #260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.socket cleanup #260
Conversation
Committed on behalf of Christopher Miller by Vladimir Panteleev <thecybershadow@gmail.com>
Conflicts: std/socket.d
…instead of overloads
Why did you switch to uint16_t instead of ushort? ushort is also guaranteed to be 16 bits. Wouldn't this change just confuse D programmers who aren't familiar with the C way? The constructor The Service class has this problem too. And Protocol. And InternetHost. Ok it looks like pretty much the whole module uses string everywhere. I don't know if that's a holdover from the old D1 module or not, but it should be changed. In serviceToPort, |
This shouldn't break any code, right? What about other methods, such as
I wanted to be consistent, but I didn't think of the time about the impact on the documentation. I'll take care of it. |
|
I understand the intent of the change, but that doesn't answer my question. Your observation also applies to similar methods which accept string parameters, such as |
Yes, they should not ask for the strong immutable guarantee from the user when they don't use it. |
Done, thanks. |
Conflicts: std/socket.d
More weird constness compiler behavior...
Guess this is ready for committing. Does anyone have issues with it? |
For the record, I noticed that a DMD unit test (runnable/testsocket.d) fails on the pull request auto-tester, but I can't reproduce the problem on my machine.
|
That test is invalid: a class destructor accesses a heap-allocated field, which is what causes the segfault. The Edit: #410. |
I want that test yanked from the dmd suite and moved to a standard phobos unittest. It's from the era where the dmd suite contained tests for the whole codebase. Doesn't need to be done as part of this pull request though. |
Does anyone know what that test is supposed to be testing? It's already catching all |
It dates back to a very old bug: http://d.puremagic.com/issues/show_bug.cgi?id=268 Obviously a number of issues weren't well handled back then. |
Ping? |
add Jenkinsfile
Take three. Previous pull request: #211, newsgroup discussion.