Browse Source

* the gp: pchar global variable converted to local, because the code generator can now cope with this

git-svn-id: branches/wasm@47922 -
nickysn 4 years ago
parent
commit
0858579b50
1 changed files with 4 additions and 3 deletions
  1. 4 3
      rtl/wasi/system.pp

+ 4 - 3
rtl/wasi/system.pp

@@ -33,7 +33,6 @@ var
   our_iov: __wasi_ciovec_t;
   our_nwritten: longint;
   i: size_t;
-  gp: pchar;
 
 function fd_write(fd: __wasi_fd_t;
                   iovs: P__wasi_ciovec_t;
@@ -41,10 +40,12 @@ function fd_write(fd: __wasi_fd_t;
                   nwritten: P__wasi_size_t): __wasi_errno_t; external 'wasi_unstable';
 
 function StrLen(P: PChar): size_t;
+var
+  lp: pchar;
 begin
-  gp := p;
+  lp := p;
   i := 0;
-  while gp[i]<>#0 do
+  while lp[i]<>#0 do
     Inc(i);
   StrLen := i;
 end;