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

Remove delegate casting#936

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:masterfromjmlidbetter:delegate_casting
Aug 26, 2019

Conversation

jmlidbetter
Copy link
Contributor

What does this implement/fix? Explain your changes.

Fixes an issue where pythonnet attempts to cast one managed delegate to another. This is explicitly forbidden in the documentation:see here. In particular:

You cannot use this method to create a delegate from a function pointer to another managed delegate

I have also removed the usage of the obselete function GetDelegateForFunctionPointer(IntPtr, Type) and replaced it with GetDelegateForFunctionPointer<IntPtr).

Does this close any currently open issues?

No

Any other comments?

It seems like this issue got partially fixed in PR#550 and was mentioned in issue#96. See also this relatedissue in dotnet core.

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

…n the NET standard documentation for GetDelegateForFunctionPointer
@Cronan
Copy link
Contributor

@filmor I don't believe I can kick the build ...

@lostmsu
Copy link
Member

@jmlidbetter can you open a bug for the issue you are trying to fix with repro steps?

@jmlidbetter
Copy link
ContributorAuthor

@lostmsu You can repro the issue by compiling in dotnet core which I don't believe is officially supported so didnt think an issue is strictly necessary in this case. Check out pr 550 for more background / precedent on the changes as well as the other things mentioned above :)

@lostmsu
Copy link
Member

Looks good to me.

@filmorfilmor merged commitf1da55e intopythonnet:masterAug 26, 2019
AlexCatarino pushed a commit to QuantConnect/pythonnet that referenced this pull requestJun 18, 2020
…n the NET standard documentation for GetDelegateForFunctionPointer (pythonnet#936)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@filmorfilmorfilmor approved these changes

@lostmsulostmsulostmsu 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.

4 participants
@jmlidbetter@Cronan@lostmsu@filmor

[8]ページ先頭

©2009-2025 Movatter.jp