Merge pull request #1178 from EXetoC/nostackframe
noStackFrame -> asmNoStackFrame
This commit is contained in:
commit
208a594ff1
3 changed files with 8 additions and 4 deletions
|
|
@ -360,10 +360,12 @@ Example:
|
|||
static int cvariable = 420;
|
||||
""".}
|
||||
|
||||
proc embedsC() {.noStackFrame.} =
|
||||
{.push stackTrace:off.}
|
||||
proc embedsC() =
|
||||
var nimrodVar = 89
|
||||
# use backticks to access Nimrod symbols within an emit section:
|
||||
{.emit: """fprintf(stdout, "%d\n", cvariable + (int)`nimrodVar`);""".}
|
||||
{.pop.}
|
||||
|
||||
embedsC()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue