Skip to content

Conversation

@JackStouffer
Copy link
Contributor

Taken over from #4712

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @JackStouffer!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also note that this only works because readImpl is completely @trusted and getcwd isn't @safe yet.
See #5928

std/file.d Outdated
the buffer, in characters, including the null-terminating character.
*/
wchar[4096] buffW = void; //enough for most common case
version (unittest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StdUnittest

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #5932

@JackStouffer
Copy link
Contributor Author

@wilzbach done

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dlang-bot dlang-bot merged commit 6c1e01c into dlang:master Jan 3, 2018
@adamdruppe
Copy link
Contributor

Is it sane to depend on a std.experimental module in the main production branch of the library?

@wilzbach
Copy link
Contributor

wilzbach commented Jan 4, 2018

We already discussed this in #4712 where the consensus between everyone (including @WalterBright and @andralex) was that using the Checked wrapper is a lot better than creeping in ugly manual overflow checks.
std.experimental is experimental because of its API not because it's not tested. Using it internally within Phobos is no problem because the user won't even know it and we can still do breaking changes with its API. It's essentially the same as if we would have added our own SafeInt wrapper internally.

@JackStouffer JackStouffer deleted the file-overflow branch January 4, 2018 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants