mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
os: Use a uintptr for NewFile
This appears to have been how it is upstream for about 10 years. Using an interface breaks if a file descriptor number is passed directly to `NewFile`, e.g., `NewFile(3, "fuzz_in")` as used in Go 1.18 fuzzing code.
This commit is contained in:
committed by
Ayke
parent
bf23839931
commit
a680bfbb7a
@@ -28,7 +28,7 @@ type mountPoint struct {
|
||||
// WARNING: this interface is not finalized and may change in a future version.
|
||||
type Filesystem interface {
|
||||
// OpenFile opens the named file.
|
||||
OpenFile(name string, flag int, perm FileMode) (FileHandle, error)
|
||||
OpenFile(name string, flag int, perm FileMode) (uintptr, error)
|
||||
|
||||
// Mkdir creates a new directoy with the specified permission (before
|
||||
// umask). Some filesystems may not support directories or permissions.
|
||||
|
||||
Reference in New Issue
Block a user