summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-23 01:17:48 +0100
committerAraq <rumpf_a@web.de>2013-12-23 01:17:48 +0100
commit9145bcfbb680d653f167a1a12f7830025aa951a5 (patch)
treecb620a359c73662d488d156e1fa7c7e28d39af0f /lib/system
parente2a4d591e5f34685071985cb4070e96b7e053a1a (diff)
downloadNim-9145bcfbb680d653f167a1a12f7830025aa951a5.tar.gz
new VM: some progress for the FFI support
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/sysio.nim4
-rw-r--r--lib/system/widestrs.nim3
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index a877f8b28..5af1c96d4 100644
--- a/lib/system/sysio.nim
+++ b/lib/system/sysio.nim
@@ -194,9 +194,9 @@ const
     # should not be translated.
 
 
-proc Open(f: var TFile, filename: string,
+proc open(f: var TFile, filename: string,
           mode: TFileMode = fmRead,
-          bufSize: int = -1): Bool =
+          bufSize: int = -1): bool =
   var p: pointer = fopen(filename, FormatOpen[mode])
   result = (p != nil)
   f = cast[TFile](p)
diff --git a/lib/system/widestrs.nim b/lib/system/widestrs.nim
index cf1f0910c..6a699274c 100644
--- a/lib/system/widestrs.nim
+++ b/lib/system/widestrs.nim
@@ -101,7 +101,8 @@ proc newWideCString*(s: cstring): WideCString =
   if s.isNil: return nil

 

   when not defined(c_strlen):

-    proc c_strlen(a: CString): int {.nodecl, noSideEffect, importc: "strlen".}

+    proc c_strlen(a: cstring): int {.
+      header: "<string.h>", noSideEffect, importc: "strlen".}

 

   let L = cstrlen(s)

   result = newWideCString(s, L)