mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 08:59:05 +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_iov: __wasi_ciovec_t;
|
||||||
our_nwritten: longint;
|
our_nwritten: longint;
|
||||||
i: size_t;
|
i: size_t;
|
||||||
gp: pchar;
|
|
||||||
|
|
||||||
function fd_write(fd: __wasi_fd_t;
|
function fd_write(fd: __wasi_fd_t;
|
||||||
iovs: P__wasi_ciovec_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';
|
nwritten: P__wasi_size_t): __wasi_errno_t; external 'wasi_unstable';
|
||||||
|
|
||||||
function StrLen(P: PChar): size_t;
|
function StrLen(P: PChar): size_t;
|
||||||
|
var
|
||||||
|
lp: pchar;
|
||||||
begin
|
begin
|
||||||
gp := p;
|
lp := p;
|
||||||
i := 0;
|
i := 0;
|
||||||
while gp[i]<>#0 do
|
while lp[i]<>#0 do
|
||||||
Inc(i);
|
Inc(i);
|
||||||
StrLen := i;
|
StrLen := i;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user