mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-28 11:26:39 +00:00
fixes #22166
(cherry picked from commit 1e20165a15)
This commit is contained in:
@@ -320,7 +320,7 @@ elif defined(windows):
|
||||
const
|
||||
BufSize = 4000
|
||||
|
||||
proc close*(f: File) {.tags: [], gcsafe.} =
|
||||
proc close*(f: File) {.tags: [], gcsafe, sideEffect.} =
|
||||
## Closes the file.
|
||||
if not f.isNil:
|
||||
discard c_fclose(f)
|
||||
@@ -763,7 +763,7 @@ proc open*(filename: string,
|
||||
if not open(result, filename, mode, bufSize):
|
||||
raise newException(IOError, "cannot open: " & filename)
|
||||
|
||||
proc setFilePos*(f: File, pos: int64, relativeTo: FileSeekPos = fspSet) {.benign.} =
|
||||
proc setFilePos*(f: File, pos: int64, relativeTo: FileSeekPos = fspSet) {.benign, sideEffect.} =
|
||||
## Sets the position of the file pointer that is used for read/write
|
||||
## operations. The file's first byte has the index zero.
|
||||
if c_fseek(f, pos, cint(relativeTo)) != 0:
|
||||
|
||||
Reference in New Issue
Block a user