Merge pull request #3941 from oderwat/hara-php-mnewString-fix
Fix for PHP mnewString()
This commit is contained in:
commit
83592af8ed
1 changed files with 1 additions and 3 deletions
|
|
@ -263,9 +263,7 @@ proc toJSStr(s: string): cstring {.asmNoStackFrame, compilerproc.} =
|
||||||
proc mnewString(len: int): string {.asmNoStackFrame, compilerproc.} =
|
proc mnewString(len: int): string {.asmNoStackFrame, compilerproc.} =
|
||||||
when defined(nimphp):
|
when defined(nimphp):
|
||||||
asm """
|
asm """
|
||||||
$result = array();
|
return str_repeat(chr(0),`len`);
|
||||||
for($i = 0; $i < `len`; $i++) $result[] = chr(0);
|
|
||||||
return $result;
|
|
||||||
"""
|
"""
|
||||||
else:
|
else:
|
||||||
asm """
|
asm """
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue