mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 01:09:27 +02:00

------------------------------------------------------------------------ r39983 | florian | 2018-10-18 20:28:03 +0200 (Thu, 18 Oct 2018) | 3 lines * properly take care of register allocations between the first and second instruction for the FoldLea optimization * check for ait_instruction after a GetNextInstruction function call * cosmetics ------------------------------------------------------------------------ ------------------------------------------------------------------------ r39986 | pierre | 2018-10-18 22:21:54 +0200 (Thu, 18 Oct 2018) | 1 line Fix for bug report #34380 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r40109 | pierre | 2018-10-31 15:43:18 +0100 (Wed, 31 Oct 2018) | 1 line Use correct field for sl_absolutetype or sl_typeconv ppropaccesslistitem type (revealed by compilation with -CriotR) ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@40482 -
32 lines
673 B
ObjectPascal
32 lines
673 B
ObjectPascal
{ Code extracted from fpc-image fpcolhash unit }
|
|
|
|
{$mode objfpc}
|
|
|
|
uses
|
|
sysutils;
|
|
|
|
type
|
|
PColHashMainNode = ^TColHashMainNode;
|
|
TColHashMainNode = packed record
|
|
childs : array[0..16] of pointer; { can be either another MainNode or a SubNode }
|
|
end;
|
|
|
|
TFPColorHashTable = class (TObject)
|
|
function AllocateMainNode : PColHashMainNode;
|
|
end;
|
|
|
|
function TFPColorHashTable.AllocateMainNode : PColHashMainNode;
|
|
var tmp : PColHashMainNode;
|
|
i : byte;
|
|
begin
|
|
Result:=nil;
|
|
tmp:=getmem(sizeof(TColHashMainNode));
|
|
if tmp=nil then raise Exception.Create('Out of memory');
|
|
for i:=0 to high(tmp^.childs) do
|
|
tmp^.childs[i]:=nil;
|
|
Result:=tmp;
|
|
end;
|
|
|
|
begin
|
|
end.
|