mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
rawEcho hack for kwin target
This commit is contained in:
@@ -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.} =
|
||||
|
||||
Reference in New Issue
Block a user