mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 18:53:29 +00:00
src/os: implement os.File.Fd() method
This commits adds a OS-specific `Fd()` function for `file_anyos.go` and `file_other.go`, which returns a uintptr to the underlying file descriptor.
This commit is contained in:
@@ -71,6 +71,10 @@ func (f stdioFileHandle) Seek(offset int64, whence int) (int64, error) {
|
||||
return -1, ErrUnsupported
|
||||
}
|
||||
|
||||
func (f stdioFileHandle) Fd() uintptr {
|
||||
return uintptr(f)
|
||||
}
|
||||
|
||||
//go:linkname putchar runtime.putchar
|
||||
func putchar(c byte)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user