|
@@ -43,10 +43,6 @@ uses
|
|
|
// -------------------------------------------------------
|
|
|
// DOMException
|
|
|
// -------------------------------------------------------
|
|
|
-{$ifndef fpc}
|
|
|
-type
|
|
|
- tFpList = tList;
|
|
|
-{$endif}
|
|
|
|
|
|
const
|
|
|
|
|
@@ -105,8 +101,6 @@ type
|
|
|
TDOMAttrDef = class;
|
|
|
PNodePool = ^TNodePool;
|
|
|
TNodePool = class;
|
|
|
- TTabNodePool = array[0..0] of TNodePool;
|
|
|
- PTabNodePool = ^TTabNodePool;
|
|
|
|
|
|
|
|
|
// -------------------------------------------------------
|
|
@@ -436,7 +430,7 @@ type
|
|
|
FEmptyNode: TDOMElement;
|
|
|
FNodeLists: THashTable;
|
|
|
FMaxPoolSize: Integer;
|
|
|
- FPools: PTabNodePool;
|
|
|
+ FPools: PNodePool;
|
|
|
FDocumentURI: DOMString;
|
|
|
function GetDocumentElement: TDOMElement;
|
|
|
function GetDocType: TDOMDocumentType;
|
|
@@ -3173,24 +3167,24 @@ var
|
|
|
sz: Integer;
|
|
|
begin
|
|
|
ext := FCurrExtent;
|
|
|
- ptrInt(ptr) := ptrInt(FCurrBlock) + FElementSize;
|
|
|
+ ptr := Pointer(FCurrBlock) + FElementSize;
|
|
|
sz := FCurrExtentSize;
|
|
|
while Assigned(ext) do
|
|
|
begin
|
|
|
// call destructors for everyone still there
|
|
|
- ptrInt(ptr_end) := ptrInt(ext) + sizeof(TExtent) + (sz - 1) * FElementSize;
|
|
|
- while ptrInt(ptr) <= ptrInt(ptr_end) do
|
|
|
+ ptr_end := Pointer(ext) + sizeof(TExtent) + (sz - 1) * FElementSize;
|
|
|
+ while ptr <= ptr_end do
|
|
|
begin
|
|
|
if TDOMNode(ptr).FPool = Self then
|
|
|
TObject(ptr).Destroy;
|
|
|
- Inc(ptrInt(ptr), FElementSize);
|
|
|
+ Inc(ptr, FElementSize);
|
|
|
end;
|
|
|
// dispose the extent and pass to the next one
|
|
|
next := ext^.Next;
|
|
|
FreeMem(ext);
|
|
|
ext := next;
|
|
|
sz := sz div 2;
|
|
|
- ptrInt(ptr) := ptrInt(ext) + sizeof(TExtent);
|
|
|
+ ptr := Pointer(ext) + sizeof(TExtent);
|
|
|
end;
|
|
|
inherited Destroy;
|
|
|
end;
|
|
@@ -3200,13 +3194,13 @@ var
|
|
|
ext: PExtent;
|
|
|
begin
|
|
|
Assert((FCurrExtent = nil) or
|
|
|
- (ptrInt(FCurrBlock) = ptrInt(FCurrExtent) + sizeof(TExtent)));
|
|
|
+ (Pointer(FCurrBlock) = Pointer(FCurrExtent) + sizeof(TExtent)));
|
|
|
Assert(AElemCount > 0);
|
|
|
|
|
|
GetMem(ext, sizeof(TExtent) + AElemCount * FElementSize);
|
|
|
ext^.Next := FCurrExtent;
|
|
|
// point to the beginning of the last block of extent
|
|
|
- FCurrBlock := TDOMNode(ptrInt(ext) + sizeof(TExtent) + (AElemCount - 1) * FElementSize);
|
|
|
+ FCurrBlock := TDOMNode(Pointer(ext) + sizeof(TExtent) + (AElemCount - 1) * FElementSize);
|
|
|
FCurrExtent := ext;
|
|
|
FCurrExtentSize := AElemCount;
|
|
|
end;
|
|
@@ -3220,7 +3214,7 @@ begin
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
- if ptrInt(FCurrBlock) = ptrInt(FCurrExtent) + sizeof(TExtent) then
|
|
|
+ if Pointer(FCurrBlock) = Pointer(FCurrExtent) + sizeof(TExtent) then
|
|
|
AddExtent(FCurrExtentSize * 2);
|
|
|
Result := FCurrBlock;
|
|
|
Dec(PChar(FCurrBlock), FElementSize);
|