← Winnitude! Search  ·  Reader Mode (2523 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 24 LINKS

Add null checks before binding by filmor · Pull Request #2406 · pythonnet/pythonnet

Repository navigation

Add null checks before binding - #2406


Closed
filmor wants to merge 1 commit into master from null-check-before-bind
Closed

Add null checks before binding #2406 filmor wants to merge 1 commit into master from null-check-before-bind

Conversation

filmor commented Jun 30, 2024



Copy link Copy Markdown
Member

No description provided.

Add null checks before binding 18afd6b lostmsu reviewed Jul 1, 2024
View reviewed changes
Comment thread src/runtime/ClassManager.cs Comment on lines -291 to +297
internal static bool ShouldBindMethod(MethodBase mb)
{
return (mb.IsPublic || mb.IsFamily || mb.IsFamilyOrAssembly);
}
internal static bool ShouldBindMethod(MethodBase mb) =>
mb != null &&
(mb.IsPublic || mb.IsFamily || mb.IsFamilyOrAssembly);

internal static bool ShouldBindField(FieldInfo fi)
{
return (fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly);
}
internal static bool ShouldBindField(FieldInfo fi) =>
fi != null &&
(fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly);

filmor commented Jul 2, 2024



Copy link Copy Markdown
Member

Author

Superceded by #2409

filmor closed this Jul 2, 2024 filmor deleted the null-check-before-bind branch October 21, 2025 09:35 Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

2 participants