php-codegen fixes

This commit is contained in:
Andreas Rumpf
2016-02-06 19:58:28 +01:00
parent db4b9b1bdd
commit 8ec7c0af20
2 changed files with 12 additions and 4 deletions

View File

@@ -275,6 +275,11 @@ proc mnewString(len: int): string {.asmNoStackFrame, compilerproc.} =
return result;
"""
when defined(nimphp):
proc nimSubstr(s: string; a, b: int): string {.
asmNoStackFrame, compilerproc.} =
asm """return substr(`s`,`a`,`b`-`a`+1);"""
proc SetCard(a: int): int {.compilerproc, asmNoStackFrame.} =
# argument type is a fake
when defined(nimphp):