Browse Source

* fixed test for 64 bit targets

florian 21 years ago
parent
commit
910ff87b4f
1 changed files with 3 additions and 4 deletions
  1. 3 4
      tests/webtbs/tw1677.pp

+ 3 - 4
tests/webtbs/tw1677.pp

@@ -8,10 +8,10 @@ procedure RefCount(const s : ansistring;expect:longint);
 type
         PLongint = ^Longint;
 var
-        P : PLongint;
+        P : psizeint;
         rc : longint;
 begin
-        P := PLongint(s);
+        P := psizeint(s);
         rc:=0;
         if (p = nil)
         then writeln('Nil string.')
@@ -20,7 +20,7 @@ begin
   {$if defined(ver1_0) or defined(ver1_9_4)}
          rc:=(p-1)^;
   {$else}
-         rc:=plongint(pchar(p)-8)^;
+         rc:=psizeint(pchar(p)-sizeof(sizeint)*2)^;
   {$endif}
 {$else}
          rc:=plongint(pchar(p)-8)^;
@@ -62,4 +62,3 @@ begin
   writeln('ok');
 end.
 
-