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

Clear weakref list when reflected object is destroyed#1758

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
filmor merged 1 commit intopythonnet:masterfromlosttech:weakref-support
Apr 9, 2022

Conversation

lostmsu
Copy link
Member

What does this implement/fix? Explain your changes.

According toofficial documentation for defining extension types, if they are to support weak references, they must clear weak reference list associated with the instance intp_clear.

This was missed when#1267 was superseded.

P.S. without the fix corresponding test would crash with segfault due to an attempt to dereference an object that no longer exists via a weak reference to it.

Does this close any currently open issues?

N/A

Checklist

Check all those that are applicable and complete.

  • Make sure to include one or more tests for your change

@lostmsulostmsu added this to the3.0.0 milestoneApr 8, 2022
@lostmsu
Copy link
MemberAuthor

lostmsu commentedApr 9, 2022
edited
Loading

Also@amos402 if you have time. This reintroduces bits of your old PR from Oct 2020.

@lostmsulostmsu requested a review fromfilmorApril 9, 2022 00:01
@filmorfilmor merged commit50da522 intopythonnet:masterApr 9, 2022
@lostmsulostmsu deleted the weakref-support branchApril 9, 2022 15:47
lostmsu added a commit to losttech/pythonnet that referenced this pull requestApr 9, 2022
According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list associated with the instance in tp_clear.Extension types were missed inpythonnet#1758 (50da522 )
lostmsu added a commit to losttech/pythonnet that referenced this pull requestApr 9, 2022
According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list associated with the instance in tp_clear.Extension types were missed inpythonnet#1758 (50da522 )
filmor pushed a commit that referenced this pull requestApr 10, 2022
According to official documentation for defining extension types, if they are to support weak references, they must clear weak reference list associated with the instance in tp_clear.Extension types were missed in#1758 (50da522 )
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@filmorfilmorfilmor approved these changes

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

Successfully merging this pull request may close these issues.

2 participants
@lostmsu@filmor

[8]ページ先頭

©2009-2025 Movatter.jp