From 1e20165a15cf8751f74751421a85075a81f799a6 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sat, 9 Mar 2024 18:43:00 +0800 Subject: fixes #22166; adds sideeffects for `close` and `setFilePos` (#23380) fixes #22166 --- lib/std/syncio.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/std') diff --git a/lib/std/syncio.nim b/lib/std/syncio.nim index 38c151bb7..44244297f 100644 --- a/lib/std/syncio.nim +++ b/lib/std/syncio.nim @@ -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: -- cgit 1.4.1-2-gfad0 oang/Nim/refs/?h=devel&id=49c6dbf4ab3e60a0e850ac876e54c0c6bc07de89'>refs log blame commit diff stats
path: root/compiler/commands.nim
blob: bae1fda3869683eb246c3e8c35764a051d563bab (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11