Skip to content

Commit

Permalink
lib: correct result type of fzE_file_close
Browse files Browse the repository at this point in the history
Discovered this while investigating the windows test failure.
Also changed mmap_test slightly, to detect file deletion failure early.
  • Loading branch information
michaellilltokiwa committed Dec 18, 2024
1 parent c33d9cc commit 11fcf63
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/base/src/fuzion/sys/fileio.fz
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ module fileio is
#
fzE_file_close(
# file descriptor
fd fuzion.sys.Pointer) i8 => native
fd fuzion.sys.Pointer) i32 => native


# seek offset in the stream represented by fd
Expand Down
2 changes: 1 addition & 1 deletion tests/lib_fileio_mmap/mmap_test.fz
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ mmap_test =>
String.from_bytes ((io.buffered.read_fully lm).drop page_size)
)

_ := io.file.delete testfile
say (io.file.delete testfile)
1 change: 1 addition & 0 deletions tests/lib_fileio_mmap/mmap_test.fz.expected_out
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ unit
--error: mmap failed--
unit
hallo!
unit

0 comments on commit 11fcf63

Please sign in to comment.