Skip to content

Comments

rangify readLink and symlink#3967

Merged
DmitryOlshansky merged 3 commits intodlang:masterfrom
aG0aep6G:rangify-readLink,symlink
Apr 26, 2016
Merged

rangify readLink and symlink#3967
DmitryOlshansky merged 3 commits intodlang:masterfrom
aG0aep6G:rangify-readLink,symlink

Conversation

@aG0aep6G
Copy link
Contributor

@aG0aep6G aG0aep6G commented Feb 3, 2016

Removing @safe from the signatures so that attribute inference takes
care of things. There are @safe unittests already, ensuring that the
functions themselves don't do anything unsafe.

Replacing @trusted declarations with @trusted function literals. This
way it's more clear that the specific call is @trusted, not the called
function.

std/file.d Outdated
auto oz = original.tempCString();
auto lz = link.tempCString();
alias posixSymlink = core.sys.posix.unistd.symlink;
immutable int result = () @trusted {return posixSymlink(oz, lz);} ();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick, please put space both before and after { and }

@aG0aep6G
Copy link
Contributor Author

aG0aep6G commented Feb 5, 2016

The differences were just because I had done the two separately and squashed the commits later. Now using ElementEncodingType and one overload + static if for both. Also added those spaces.

@aG0aep6G aG0aep6G force-pushed the rangify-readLink,symlink branch from 5e879bb to bf85715 Compare February 9, 2016 18:19
@aG0aep6G
Copy link
Contributor Author

Last activity was a week ago. Can I get some more review on this?

@DmitryOlshansky
Copy link
Member

Please rebase

@aG0aep6G aG0aep6G force-pushed the rangify-readLink,symlink branch from f241204 to e0062be Compare April 5, 2016 14:11
@aG0aep6G
Copy link
Contributor Author

aG0aep6G commented Apr 5, 2016

Please rebase

done

@DmitryOlshansky
Copy link
Member

done

And rebase again ...

@aG0aep6G aG0aep6G force-pushed the rangify-readLink,symlink branch from e0062be to 0eff236 Compare April 19, 2016 18:01
@aG0aep6G
Copy link
Contributor Author

And rebase again ...

Done again.

@DmitryOlshansky
Copy link
Member

LGTM

@DmitryOlshansky
Copy link
Member

Done again.

Ehm.. rebase again

auto dynamicBuffer = new char[](bufferLen * 3 / 2);

auto dynamicBuffer = new char[](bufferLen * 3 / 2);
foreach(i; 0 .. 10)
Copy link
Member

Choose a reason for hiding this comment

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

Why 10 ? And then what? At least a comment could help a bit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ditto. I just indented this.

Removing @safe from the signatures so that attribute inference takes
care of things. There are @safe unittests already, ensuring that the
functions themselves don't do anything unsafe.

Replacing @trusted declarations with @trusted function literals. This
way it's more clear that the specific call is @trusted, not the called
function.
ElementType -> ElementEncodingType
template constraints -> static if
@aG0aep6G aG0aep6G force-pushed the rangify-readLink,symlink branch from 0eff236 to 863b251 Compare April 26, 2016 13:27
@aG0aep6G
Copy link
Contributor Author

Ehm.. rebase again

Done again. The conflicts have only been in changelog.dd so far.

@DmitryOlshansky
Copy link
Member

Auto-merge toggled on

@wilzbach
Copy link
Contributor

The conflicts have only been in changelog.dd so far.

-> hopefully soon fixed by #4228

@DmitryOlshansky DmitryOlshansky merged commit e323667 into dlang:master Apr 26, 2016
@aG0aep6G aG0aep6G deleted the rangify-readLink,symlink branch April 26, 2016 19:44
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.

4 participants