overload resolution for proc vars
This commit is contained in:
parent
36818817bd
commit
300430fbba
56 changed files with 2772 additions and 2430 deletions
|
|
@ -144,7 +144,7 @@ type
|
|||
TFileStream* = object of TStream
|
||||
f: TFile
|
||||
|
||||
proc fsClose(s: PFileStream) = closeFile(s.f)
|
||||
proc fsClose(s: PFileStream) = close(s.f)
|
||||
proc fsAtEnd(s: PFileStream): bool = return EndOfFile(s.f)
|
||||
proc fsSetPosition(s: PFileStream, pos: int) = setFilePos(s.f, pos)
|
||||
proc fsGetPosition(s: PFileStream): int = return int(getFilePos(s.f))
|
||||
|
|
@ -171,7 +171,7 @@ proc newFileStream*(filename: string, mode: TFileMode): PFileStream =
|
|||
## creates a new stream from the file named `filename` with the mode `mode`.
|
||||
## If the file cannot be opened, nil is returned.
|
||||
var f: TFile
|
||||
if OpenFile(f, filename, mode): result = newFileStream(f)
|
||||
if Open(f, filename, mode): result = newFileStream(f)
|
||||
|
||||
|
||||
when true:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue