phobos icon indicating copy to clipboard operation
phobos copied to clipboard

Make allocate @safe

Open edi33416 opened this issue 6 years ago • 6 comments

For allocators that implement their own allocate method, this should be a pure nothrow @safe function. Allocators that are building on top of such allocators should infer the function attributes from their parents.

This PR is a subset of #5330, as this approach will provide us with better granularity. More smaller PRs to come :)

edi33416 avatar Nov 21 '17 14:11 edi33416

Thanks for your pull request, @edi33416! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.

Some tips to help speed things up:

  • smaller, focused PRs are easier to review than big ones

  • try not to mix up refactoring or style changes with bug fixes or feature enhancements

  • provide helpful commit messages explaining the rationale behind each change

Bear in mind that large or tricky changes may require multiple rounds of review and revision.

Please see CONTRIBUTING.md for more information.

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.

dlang-bot avatar Nov 21 '17 14:11 dlang-bot

@edi33416 I suggest for now let's leave AffixAllocator with an unsafe allocate.

andralex avatar Nov 30 '17 03:11 andralex

@edi33416 I recommend splitting this PR up into smaller chunks, s.t. it can be reviewed and merged more quickly. As an additional benefit your chances of running into merge conflicts decrease too ;-)

wilzbach avatar Dec 01 '17 07:12 wilzbach

Per the convo with @edi33416 today, please convert this diff to making allocate only nothrow and (where applicable) @nogc.

andralex avatar Dec 06 '17 00:12 andralex

Ping @edi33416

wilzbach avatar Mar 30 '18 19:03 wilzbach

@edi33416 Any chance of finishing this?

RazvanN7 avatar Oct 22 '21 11:10 RazvanN7