mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 09:59:29 +02:00
* the gp: pchar global variable converted to local, because the code generator can now cope with this
git-svn-id: branches/wasm@47922 -
This commit is contained in:
parent
46a09bd8e4
commit
0858579b50
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user