Skip to content
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

std.complex: Add member function to returnComplex as a native type #8415

Merged
merged 2 commits into from
Aug 15, 2022

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Mar 21, 2022

So that std.complex can be passed to extern(C) complex functions where ABI compatibility is required.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

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 run digger -- build "master + phobos#8415"

@ibuclaw ibuclaw force-pushed the complexnative branch 2 times, most recently from 5654458 to 8d9d9e9 Compare March 31, 2022 09:31
@@ -478,6 +478,17 @@ if (isFloatingPoint!T)
}
return this;
}

auto toNative()
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you give this a Ddoc comment?

@dukc
Copy link
Contributor

dukc commented Apr 6, 2022

As Dennis mentioned, this should have documentation. Maybe a documented unit test. The one you added would serve well IMO.

Otherwise LGTM.

std/complex.d Outdated

auto toNative()
{
import core.stdc.config;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Buildkite:

std/complex.d(484:16)[warn]: Local imports should specify the symbols being imported to avoid hiding local symbols.

@RazvanN7
Copy link
Collaborator

RazvanN7 commented Jun 6, 2022

I took the liberty of rebasing this, adding a comment to the function and solving the buildkite failure.

@ibuclaw @dkorpel could please take a look?

@dukc
Copy link
Contributor

dukc commented Jun 6, 2022

Why not a Ddoc comment though?

@RazvanN7
Copy link
Collaborator

RazvanN7 commented Jul 5, 2022

@dukc I simply followed the style that is currently present. But I made it a ddoc comment now.

@RazvanN7 RazvanN7 merged commit 3baff76 into dlang:master Aug 15, 2022
@ibuclaw ibuclaw deleted the complexnative branch September 6, 2022 09:11
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.

6 participants