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

Allow borrowing from NewReference#1088

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

Conversation

lostmsu
Copy link
Member

@lostmsulostmsu commentedMar 11, 2020
edited
Loading

implemented as an implicit conversion

To be honest, I would prefer an explicitNewReference.Borrow() method due to "explicit is better than implicit" motto. The only problem with implicit conversion that I see isnew PyObject(newRef) will call an extra incref implicitly as opposed tonewRef.MoveToPyObject(), and will go unnoticed.

Another thing to consider is having anull-check in the conversion. E.g. should we throwNullReferenceException ifNewReference isnull?

Does this close any currently open issues?

Related to#1087

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

implemented as an implicit conversion
@lostmsulostmsu mentioned this pull requestMar 11, 2020
4 tasks
@codecov-io
Copy link

codecov-io commentedMar 11, 2020
edited
Loading

Codecov Report

Merging#1088 intomaster willnot change coverage by%.
The diff coverage isn/a.

Impacted file tree graph

@@           Coverage Diff           @@##           master    #1088   +/-   ##=======================================  Coverage   86.75%   86.75%           =======================================  Files           1        1             Lines         302      302           =======================================  Hits          262      262             Misses         40       40
FlagCoverage Δ
#setup_linux65.56% <ø> (ø)
#setup_windows71.52% <ø> (ø)

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updated145ab1...0f03624. Read thecomment docs.

@lostmsu
Copy link
MemberAuthor

@amos402 can you review this?

@lostmsulostmsu merged commit638dc1c intopythonnet:masterMar 17, 2020
@lostmsulostmsu deleted the features/BorrowFromNewReference branchMarch 17, 2020 06:22
@lostmsu
Copy link
MemberAuthor

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@amos402amos402amos402 approved these changes

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

Successfully merging this pull request may close these issues.

3 participants
@lostmsu@codecov-io@amos402

[8]ページ先頭

©2009-2025 Movatter.jp