Skip to content

Commit 7497aa0

Browse files
committed
Fix std::feof()
1 parent 938eea7 commit 7497aa0

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

playground/umka.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

runtime/std.um

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,7 @@ fn feof*(f: File): bool {
174174
if f == null {
175175
return true
176176
}
177-
eof := bool(rtlfeof(f))
178-
return eof
177+
return rtlfeof(f) != 0
179178
}
180179

181180
fn rtlfflush(f: File): int

src/umka_runtime_src.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ static const char *runtimeModuleSources[] = {
185185
" if f == null {\n"
186186
" return true\n"
187187
" }\n"
188-
" eof := bool(rtlfeof(f)) \n"
189-
" return eof\n"
188+
" return rtlfeof(f) != 0\n"
190189
"}\n"
191190
"\n"
192191
"fn rtlfflush(f: File): int\n"

0 commit comments

Comments
 (0)