Skip to content

Commit f01e820

Browse files
committed
So that Demo31 unit tests run without errors.
1 parent da8947e commit f01e820

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Source/WrapDelphiClasses.pas

+13-1
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ TPyDelphiStrings = class (TPyDelphiPersistent)
212212
function Set_Text( AValue : PPyObject; AContext : Pointer) : integer; cdecl;
213213
// Virtual Methods
214214
function Assign(ASource : PPyObject) : PPyObject; override;
215+
{$IFDEF EXTENDED_RTTI}
216+
class function ExcludedExposedMembers(APythonType: TPythonType): TArray<string>; override;
217+
{$ENDIF EXTENDED_RTTI}
215218
public
216219
function Repr : PPyObject; override;
217220
// Mapping services
@@ -1520,6 +1523,15 @@ function TPyDelphiStrings.EndUpdate_Wrapper(args: PPyObject): PPyObject;
15201523
Result := nil;
15211524
end;
15221525

1526+
{$IFDEF EXTENDED_RTTI}
1527+
class function TPyDelphiStrings.ExcludedExposedMembers(APythonType: TPythonType): TArray<string>;
1528+
begin
1529+
Result := inherited ExcludedExposedMembers(APythonType);
1530+
// so that TPyDelphiStrings.Assign is called from the inherited Assign
1531+
Result := Result + ['Assign'];
1532+
end;
1533+
{$ENDIF EXTENDED_RTTI}
1534+
15231535
class function TPyDelphiStrings.GetContainerAccessClass: TContainerAccessClass;
15241536
begin
15251537
Result := TStringsAccess;
@@ -1689,7 +1701,7 @@ procedure TPyDelphiStrings.SetDelphiObject(const Value: TStrings);
16891701
class procedure TPyDelphiStrings.SetupType(PythonType: TPythonType);
16901702
begin
16911703
inherited;
1692-
PythonType.Services.Mapping := PythonType.Services.Mapping + [msLength, msSubscript];
1704+
PythonType.Services.Mapping := {PythonType.Services.Mapping +} [msLength, msSubscript];
16931705
end;
16941706

16951707
{ TPyDelphiBasicAction }

0 commit comments

Comments
 (0)