Browse Source

Add missing `io.Stream_Mode` responses

Feoramund 1 year ago
parent
commit
981a2e1a00
4 changed files with 4 additions and 4 deletions
  1. 1 1
      core/bytes/buffer.odin
  2. 1 1
      core/c/libc/stdio.odin
  3. 1 1
      core/os/os2/file_posix.odin
  4. 1 1
      core/os/os2/file_windows.odin

+ 1 - 1
core/bytes/buffer.odin

@@ -402,7 +402,7 @@ _buffer_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte, offse
 		buffer_destroy(b)
 		return
 	case .Query:
-		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Size, .Destroy})
+		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Size, .Destroy, .Query})
 	}
 	return 0, .Empty
 }

+ 1 - 1
core/c/libc/stdio.odin

@@ -368,7 +368,7 @@ to_stream :: proc(file: ^FILE) -> io.Stream {
 			return 0, .Empty
 		
 		case .Query:
-			return io.query_utility({ .Close, .Flush, .Read, .Read_At, .Write, .Write_At, .Seek, .Size })
+			return io.query_utility({ .Close, .Flush, .Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Query })
 		}
 		return
 	}

+ 1 - 1
core/os/os2/file_posix.odin

@@ -446,7 +446,7 @@ _file_stream_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte,
 		return
 
 	case .Query:
-		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Flush, .Close, .Query})
+		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Flush, .Close, .Destroy, .Query})
 
 	case:
 		return 0, .Empty

+ 1 - 1
core/os/os2/file_windows.odin

@@ -813,7 +813,7 @@ _file_stream_proc :: proc(stream_data: rawptr, mode: io.Stream_Mode, p: []byte,
 		err = error_to_io_error(ferr)
 		return
 	case .Query:
-		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Flush, .Close, .Query})
+		return io.query_utility({.Read, .Read_At, .Write, .Write_At, .Seek, .Size, .Flush, .Close, .Destroy, .Query})
 	}
 	return 0, .Empty
 }