SIGN IN SIGN UP

reworked the way .NET objects are constructed from Python

was: tp_new implementation would call .NET constructor and return a fully constructed object

now:
Except for some special .NET types tp_new creates uninitialized .NET object, which is later initialized by calling __init__.

__init__ is set using type dictionary to a MethodObject, that contains ConstructorInfo[] instead of MethodInfo[]

This allows Python to:
1) freely override __init__
2) when deriving from .NET types call base __init__ (e.g. .NET constructor), and choose the overload as needed

fixes https://github.com/pythonnet/pythonnet/issues/238
V
Victor Nova committed
c4238d9a69fa714458c24006c3411c49697c0047
Parent: fc31de1
Committed by Victor <lostfreeman@gmail.com> on 1/4/2022, 8:23:44 PM