From 56a912fb2a6d7cf3723b0ec5e5af1967ea583657 Mon Sep 17 00:00:00 2001 From: klaufir Date: Sun, 1 Jun 2014 04:20:47 +0200 Subject: [PATCH 1/2] adding header pragma for printf ffi example --- doc/manual.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual.txt b/doc/manual.txt index 5afe385bb6..57cf39765e 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -5485,7 +5485,7 @@ the argument is missing, the C name is the Nimrod identifier *exactly as spelled*: .. code-block:: - proc printf(formatstr: cstring) {.importc: "printf", varargs.} + proc printf(formatstr: cstring) {.header: "stdio.h", importc: "printf", varargs.} Note that this pragma is somewhat of a misnomer: Other backends will provide the same feature under the same name. From 24c00440464edb68277fd5bc4f90caa0ad11c988 Mon Sep 17 00:00:00 2001 From: klaufir Date: Tue, 3 Jun 2014 08:07:27 +0200 Subject: [PATCH 2/2] header pragma set to '' in importc section --- doc/manual.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual.txt b/doc/manual.txt index 57cf39765e..3af41faecf 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -5485,7 +5485,7 @@ the argument is missing, the C name is the Nimrod identifier *exactly as spelled*: .. code-block:: - proc printf(formatstr: cstring) {.header: "stdio.h", importc: "printf", varargs.} + proc printf(formatstr: cstring) {.header: "", importc: "printf", varargs.} Note that this pragma is somewhat of a misnomer: Other backends will provide the same feature under the same name.