mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:29:16 +02:00
* no need to copy the local var paramater in StrLen()
git-svn-id: branches/wasm@47948 -
This commit is contained in:
parent
c24446c037
commit
065d2c718d
@ -36,12 +36,10 @@ function fd_write(fd: __wasi_fd_t;
|
|||||||
|
|
||||||
function StrLen(P: PChar): size_t;
|
function StrLen(P: PChar): size_t;
|
||||||
var
|
var
|
||||||
lp: pchar;
|
|
||||||
i: size_t;
|
i: size_t;
|
||||||
begin
|
begin
|
||||||
lp := p;
|
|
||||||
i := 0;
|
i := 0;
|
||||||
while lp[i]<>#0 do
|
while p[i]<>#0 do
|
||||||
Inc(i);
|
Inc(i);
|
||||||
StrLen := i;
|
StrLen := i;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user