* made TObject usable, even if no ansistring support is available

git-svn-id: trunk@34974 -
This commit is contained in:
florian 2016-11-26 19:33:31 +00:00
parent da7e1b3769
commit bcb7061314
2 changed files with 4 additions and 4 deletions

View File

@ -946,7 +946,7 @@
getinterfacetable:=PVmt(Self)^.vIntfTable; getinterfacetable:=PVmt(Self)^.vIntfTable;
end; end;
class function TObject.UnitName : ansistring; class function TObject.UnitName : {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};
type type
// from the typinfo unit // from the typinfo unit
TClassTypeInfo = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif}record TClassTypeInfo = {$ifndef FPC_REQUIRES_PROPER_ALIGNMENT}packed{$endif}record
@ -994,7 +994,7 @@
result:=PtrInt(Self); result:=PtrInt(Self);
end; end;
function TObject.ToString: ansistring; function TObject.ToString: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};
begin begin
result:=ClassName; result:=ClassName;
end; end;

View File

@ -248,11 +248,11 @@
class function GetInterfaceTable : pinterfacetable; class function GetInterfaceTable : pinterfacetable;
{ new since Delphi 2009 } { new since Delphi 2009 }
class function UnitName : ansistring; class function UnitName : {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};
class function QualifiedClassName: ansistring; class function QualifiedClassName: ansistring;
function Equals(Obj: TObject) : boolean;virtual; function Equals(Obj: TObject) : boolean;virtual;
function GetHashCode: PtrInt;virtual; function GetHashCode: PtrInt;virtual;
function ToString: ansistring;virtual; function ToString: {$ifdef FPC_HAS_FEATURE_ANSISTRINGS}ansistring{$else FPC_HAS_FEATURE_ANSISTRINGS}shortstring{$endif FPC_HAS_FEATURE_ANSISTRINGS};virtual;
end; end;
IUnknown = interface IUnknown = interface