We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09de8cd commit 3cbcec4Copy full SHA for 3cbcec4
1 file changed
pixie/io-blocking.pxi
@@ -13,6 +13,7 @@
13
(def fclose (ffi-fn libc "fclose" [CVoidP] CInt))
14
(def popen (ffi-fn libc "popen" [CCharP CCharP] CVoidP))
15
(def pclose (ffi-fn libc "pclose" [CVoidP] CInt))
16
+(def EOF -1)
17
18
(deftype FileStream [fp]
19
IInputStream
@@ -85,7 +86,7 @@
85
86
([cnt chr]
87
(assert (integer? chr))
88
(let [written (write-byte fp chr)]
- (if (= written 0)
89
+ (if (= written EOF)
90
(reduced cnt)
91
(+ cnt written)))))))
92
0 commit comments