Skip to content

Filename: Convert extension-related code to use D slices#8672

Closed
Geod24 wants to merge 8 commits intodlang:masterfrom
Geod24:argv0-1
Closed

Filename: Convert extension-related code to use D slices#8672
Geod24 wants to merge 8 commits intodlang:masterfrom
Geod24:argv0-1

Conversation

@Geod24
Copy link
Member

@Geod24 Geod24 commented Sep 6, 2018

Better reviewed commit-by commit.
Spin off #8575

@Geod24 Geod24 requested a review from WalterBright September 6, 2018 08:38
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @Geod24! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

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.

Testing this PR locally

If 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 + dmd#8672"

{
stat_t st;
if (stat(name, &st) < 0)
if (name.toCStringThen!((v) => stat(v.ptr, &st)) < 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

The parentheses around v in the lambda parameter list is not necessary.

/// Ditto
extern (D) static bool equalsExt(const(char)[] name, const(char)[] ext) pure
{
auto e = FileName.ext(name);
Copy link
Contributor

Choose a reason for hiding this comment

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

const?

@jacob-carlborg
Copy link
Contributor

LGTM.

@Geod24
Copy link
Member Author

Geod24 commented Sep 6, 2018

Addressed @jacob-carlborg 's comments

@Geod24
Copy link
Member Author

Geod24 commented Sep 6, 2018

This isn't needed anymore, the main PR was merged.

@Geod24 Geod24 closed this Sep 6, 2018
@Geod24 Geod24 deleted the argv0-1 branch September 6, 2018 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants