* move RTTI related types from rtti.inc to rttidecl.inc

git-svn-id: trunk@39250 -
This commit is contained in:
svenbarth 2018-06-20 19:00:03 +00:00
parent bbf578b193
commit 393d1c2256
2 changed files with 86 additions and 86 deletions

View File

@ -14,92 +14,6 @@
{ Run-Time type information routines }
type
PRecordElement=^TRecordElement;
TRecordElement=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
{$ifdef VER3_0}
TypeInfo: Pointer;
{$else}
TypeInfo: PPointer;
{$endif}
{$ifdef VER2_6}
Offset: Longint;
{$else}
Offset: SizeInt;
{$endif}
end;
PRecordInfoFull=^TRecordInfoFull;
TRecordInfoFull=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
{$ifndef VER3_0}
InitTable: Pointer;
{$endif VER3_0}
Size: Longint;
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
PRecordInfoInit=^TRecordInfoInit;
{$ifndef VER3_0}
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
TRTTIRecVarOp=procedure(ARec: Pointer);
TRTTIRecCopyOp=procedure(ASrc, ADest: Pointer);
TRTTIRecOpType=(rotAny, rotInitialize, rotFinalize, rotAddRef, rotCopy);
PRTTIRecordOpVMT=^TRTTIRecordOpVMT;
TRTTIRecordOpVMT=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Initialize: TRTTIRecVarOp;
Finalize: TRTTIRecVarOp;
AddRef: TRTTIRecVarOp;
Copy: TRTTIRecCopyOp;
end;
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
TRecordInfoInit=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Terminator: Pointer;
Size: Longint;
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
RecordOp: PRTTIRecordOpVMT;
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
{$else VER3_0}
TRecordInfoInit=TRecordInfoFull;
{$endif VER3_0}
PArrayInfo=^TArrayInfo;
TArrayInfo=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Size: SizeInt;
ElCount: SizeInt;
{$ifdef VER3_0}
ElInfo: Pointer;
{$else}
ElInfo: PPointer;
{$endif}
DimCount: Byte;
Dims:array[0..255] of Pointer;
end;
function RTTIArraySize(typeInfo: Pointer): SizeInt;
begin
{$ifdef VER3_0}

View File

@ -32,3 +32,89 @@ const
tkManagedTypes = [tkAstring,tkWstring,tkUstring,tkArray,
tkObject,tkRecord,tkDynArray,tkInterface,tkVariant];
type
PRecordElement=^TRecordElement;
TRecordElement=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
{$ifdef VER3_0}
TypeInfo: Pointer;
{$else}
TypeInfo: PPointer;
{$endif}
{$ifdef VER2_6}
Offset: Longint;
{$else}
Offset: SizeInt;
{$endif}
end;
PRecordInfoFull=^TRecordInfoFull;
TRecordInfoFull=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
{$ifndef VER3_0}
InitTable: Pointer;
{$endif VER3_0}
Size: Longint;
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
PRecordInfoInit=^TRecordInfoInit;
{$ifndef VER3_0}
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
TRTTIRecVarOp=procedure(ARec: Pointer);
TRTTIRecCopyOp=procedure(ASrc, ADest: Pointer);
TRTTIRecOpType=(rotAny, rotInitialize, rotFinalize, rotAddRef, rotCopy);
PRTTIRecordOpVMT=^TRTTIRecordOpVMT;
TRTTIRecordOpVMT=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Initialize: TRTTIRecVarOp;
Finalize: TRTTIRecVarOp;
AddRef: TRTTIRecVarOp;
Copy: TRTTIRecCopyOp;
end;
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
TRecordInfoInit=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Terminator: Pointer;
Size: Longint;
{$ifdef FPC_HAS_MANAGEMENT_OPERATORS}
RecordOp: PRTTIRecordOpVMT;
{$endif FPC_HAS_MANAGEMENT_OPERATORS}
Count: Longint;
{ Elements: array[count] of TRecordElement }
end;
{$else VER3_0}
TRecordInfoInit=TRecordInfoFull;
{$endif VER3_0}
PArrayInfo=^TArrayInfo;
TArrayInfo=
{$ifdef USE_PACKED}
packed
{$endif USE_PACKED}
record
Size: SizeInt;
ElCount: SizeInt;
{$ifdef VER3_0}
ElInfo: Pointer;
{$else}
ElInfo: PPointer;
{$endif}
DimCount: Byte;
Dims:array[0..255] of Pointer;
end;