-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Make std.socket DIP1000 compatible #6384
Conversation
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#6384" |
std/socket.d
Outdated
@@ -2477,13 +2477,19 @@ public: | |||
assert(!errorSet.isSet(testPair[1])); | |||
|
|||
ubyte[1] b; | |||
testPair[0].send(b[]); | |||
// std.socket isn't fully @safe anymore - see https://github.com/dlang/phobos/pull/6204 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment seems odd/wrong – std.socket is just as safe as before, it's just that the send
/receive
arguments aren't marked as scope
, so client code isn't safe anymore with dip1000.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Tried to improve the wording.
Seems like the best compromise – |
From @WalterBright:
#6204 (comment)