Also include string.h for strlen for C backend
This commit is contained in:
parent
a41be8021b
commit
9bb739332f
1 changed files with 1 additions and 1 deletions
|
|
@ -1286,7 +1286,7 @@ proc genArrayLen(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
|
||||||
if op == mHigh: unaryExpr(p, e, d, "($1Len0-1)")
|
if op == mHigh: unaryExpr(p, e, d, "($1Len0-1)")
|
||||||
else: unaryExpr(p, e, d, "$1Len0")
|
else: unaryExpr(p, e, d, "$1Len0")
|
||||||
of tyCString:
|
of tyCString:
|
||||||
if gCmd == cmdCompileToCpp: useStringh(p.module)
|
useStringh(p.module)
|
||||||
if op == mHigh: unaryExpr(p, e, d, "(strlen($1)-1)")
|
if op == mHigh: unaryExpr(p, e, d, "(strlen($1)-1)")
|
||||||
else: unaryExpr(p, e, d, "strlen($1)")
|
else: unaryExpr(p, e, d, "strlen($1)")
|
||||||
of tyString, tySequence:
|
of tyString, tySequence:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue