1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-22 23:38:50 -05:00

Fixt uPSRuntime

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@65 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Raymond 2009-09-14 23:13:24 +00:00
parent 809c69bafd
commit ae5d0e9d5b

View File

@ -4108,7 +4108,7 @@ end;
function PSDynArrayGetLength(arr: Pointer; aType: TPSTypeRec): Longint; function PSDynArrayGetLength(arr: Pointer; aType: TPSTypeRec): Longint;
begin begin
if aType.BaseType <> btArray then raise Exception.Create(RPS_InvalidArray); if aType.BaseType <> btArray then raise Exception.Create(RPS_InvalidArray);
if arr = nil then Result := 0 else Result := Longint(Pointer(IPointer(arr)-PointerSize)^); if arr = nil then Result := 0 else Result := Longint(Pointer(IPointer(arr)-PointerSize)^) {$IFDEF FPC} +1 {$ENDIF};
end; end;
procedure PSDynArraySetLength(var arr: Pointer; aType: TPSTypeRec; NewLength: Longint); procedure PSDynArraySetLength(var arr: Pointer; aType: TPSTypeRec; NewLength: Longint);
@ -4136,7 +4136,7 @@ begin
end; end;
ReallocMem(arr, NewLength * elSize + PointerSize2); ReallocMem(arr, NewLength * elSize + PointerSize2);
arr := Pointer(IPointer(Arr)+PointerSize); arr := Pointer(IPointer(Arr)+PointerSize);
Longint(Arr^) := NewLength; Longint(Arr^) := NewLength {$IFDEF FPC} -1 {$ENDIF};
arr := Pointer(IPointer(Arr)+PointerSize); arr := Pointer(IPointer(Arr)+PointerSize);
for i := OldLen to NewLength -1 do for i := OldLen to NewLength -1 do
begin begin
@ -4156,7 +4156,7 @@ begin
GetMem(p, NewLength * elSize + PointerSize2); GetMem(p, NewLength * elSize + PointerSize2);
Longint(p^) := 1; Longint(p^) := 1;
p:= Pointer(IPointer(p)+PointerSize); p:= Pointer(IPointer(p)+PointerSize);
Longint(p^) := NewLength; Longint(p^) := NewLength {$IFDEF FPC} -1 {$ENDIF};
p := Pointer(IPointer(p)+PointerSize); p := Pointer(IPointer(p)+PointerSize);
if OldLen <> 0 then if OldLen <> 0 then
begin begin