rawEcho hack for kwin target

This commit is contained in:
Simon Hafner
2013-02-07 17:49:34 -06:00
parent 5a31bc8274
commit 9598d42882

View File

@@ -298,8 +298,18 @@ type
replaceData*: proc (start, len: int, text: cstring) {.nimcall.}
setAttribute*: proc (name, value: cstring) {.nimcall.}
setAttributeNode*: proc (attr: ref TNode) {.nimcall.}
when defined(kwin):
proc rawEcho {.compilerproc, nostackframe.} =
asm """
var buf = "";
for (var i = 0; i < arguments.length; ++i) {
buf += `toEcmaStr`(arguments[i]);
}
print(buf);
"""
when defined(nodejs):
elif defined(nodejs):
proc ewriteln(x: cstring) = log(x)
proc rawEcho {.compilerproc, nostackframe.} =