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 |