Skip to content

Commit e22e60d

Browse files
committed
Do not expose constructors. Class instantiation should be handled by CreateWith (pythonic way). CreateWith should take account of multiple constructors.
1 parent f5fb751 commit e22e60d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/WrapDelphi.pas

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,8 +3249,10 @@ class procedure TPyDelphiObject.ExposeMethods(AClass: TClass;
32493249
if (Ord(LRttiMethod.Visibility) < Ord(TMemberVisibility.mvProtected)) then
32503250
Continue;
32513251

3252-
// Ingnore destructors and operator overloads
3253-
if LRttiMethod.MethodKind in [mkDestructor, mkClassDestructor, mkOperatorOverload] then
3252+
// Ingnore constructors, destructors and operator overloads
3253+
if LRttiMethod.MethodKind in [mkConstructor, mkDestructor,
3254+
mkClassConstructor, mkClassDestructor, mkOperatorOverload]
3255+
then
32543256
Continue;
32553257

32563258
// Ignore excluded methods

0 commit comments

Comments
 (0)