Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disable implicit conversion from PyFloat to uint64#1362

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lostmsu merged 2 commits intopythonnet:masterfromtminka:no-implicit-float-to-uint64
Jan 21, 2021

Conversation

tminka
Copy link
Contributor

What does this implement/fix? Explain your changes.

Fixes an oversight in#1343 that allows PyFloat to continue being converted to uint64.

Does this close any currently open issues?

Fixes the test failures in#1361

Any other comments?

...

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change
  • If an enhancement PR, please create docs and at best an example
  • Add yourself toAUTHORS
  • Updated theCHANGELOG

Comment on lines 702 to 704
if (Runtime.PyObject_TYPE(value) != Runtime.PyLongType)
{
op = Runtime.PyNumber_Long(value);
if (op == IntPtr.Zero)
{
goto convert_error;
}
goto type_error;
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be skipped alltogether.https://docs.python.org/3.8/c-api/long.html#c.PyLong_AsUnsignedLongLong already checks the type.

@lostmsulostmsu merged commit7e7cbca intopythonnet:masterJan 21, 2021
@tminkatminka deleted the no-implicit-float-to-uint64 branchJanuary 21, 2021 21:29
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lostmsulostmsulostmsu left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@tminka@lostmsu

[8]ページ先頭

©2009-2025 Movatter.jp