We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54d8544 commit 5f26625Copy full SHA for 5f26625
src/pylib/Lib/io.nim
@@ -38,6 +38,8 @@ export FileNotFoundError
38
39
import ./os_impl/posix_like/truncate
40
import ./os_impl/posix_like/isatty
41
+import ./signal_impl/state
42
+discard signal_global_state
43
import ./ncodec
44
export DefErrors, LookupError
45
import ../pystring/[strimpl, strbltins]
@@ -69,7 +71,12 @@ type
69
71
70
72
converter toUnderFile(f: IOBase): File = f.file
73
-proc flush*(f: IOBase) = f.flushFile()
74
+proc c_fflush(f: File): cint {.
75
+ importc: "fflush", header: "<stdio.h>".}
76
+proc flush*(f: IOBase) =
77
+ let ret = f.c_fflush()
78
+ if ret != 0:
79
+ raiseErrno()
80
81
func tell*(f: IOBase): int64 = f.getFilePos()
82
0 commit comments