summary refs log tree commit diff stats
path: root/lib/system/jssys.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-02-06 19:58:28 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-02-06 19:58:28 +0100
commit8ec7c0af2046e66fc4f3d3d8b04c06ddfc2b566d (patch)
tree79cb171fcb86b5f09e869ff243b9cd2e480c122b /lib/system/jssys.nim
parentdb4b9b1bdd3309ef8382ff1eda529f8634b12a33 (diff)
downloadNim-8ec7c0af2046e66fc4f3d3d8b04c06ddfc2b566d.tar.gz
php-codegen fixes
Diffstat (limited to 'lib/system/jssys.nim')
-rw-r--r--lib/system/jssys.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/system/jssys.nim b/lib/system/jssys.nim
index 8394396b5..ceeb5563f 100644
--- a/lib/system/jssys.nim
+++ b/lib/system/jssys.nim
@@ -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):
4 125 126 127 128 129 130 131 132 133 134 135 136 137 138