From 92cf673f37c077a90cc8e95f641810ae31a6fbc7 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 4 Mar 2016 21:59:58 +0100 Subject: PHP codegen: use nimAt for PHP 5.3 compatibility --- lib/system/jssys.nim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/system/jssys.nim') diff --git a/lib/system/jssys.nim b/lib/system/jssys.nim index ceeb5563f..c96f2f958 100644 --- a/lib/system/jssys.nim +++ b/lib/system/jssys.nim @@ -275,6 +275,12 @@ proc mnewString(len: int): string {.asmNoStackFrame, compilerproc.} = return result; """ +when defined(nimphp): + proc nimAt(x: string; i: int): string {.asmNoStackFrame, compilerproc.} = + asm """ + return `x`[`i`]; + """ + when defined(nimphp): proc nimSubstr(s: string; a, b: int): string {. asmNoStackFrame, compilerproc.} = -- cgit 1.4.1-2-gfad0