mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-06 17:17:18 -04:00
windows: add SetConsoleCursorPosition
Relates to https://github.com/gotestyourself/gotestsum/pull/115#issuecomment-629785089 For details see: https://docs.microsoft.com/en-us/windows/console/SetConsoleCursorPosition Change-Id: I512428b64af253916c81187cb644e40a6ba418b5 GitHub-Last-Rev: c6c7ba0ad0a79ff6afcfb837836008bab246b85d GitHub-Pull-Request: golang/sys#87 Reviewed-on: https://go-review.googlesource.com/c/sys/+/258038 Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Trust: Alex Brainman <alex.brainman@gmail.com> Trust: Tobias Klauser <tobias.klauser@gmail.com> Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
committed by
Alex Brainman
parent
ac719f4daa
commit
8445cc04cb
@@ -202,6 +202,11 @@ func (p *Param) SyscallArgList() []string {
|
||||
s = fmt.Sprintf("unsafe.Pointer(%s)", p.Name)
|
||||
case t == "bool":
|
||||
s = p.tmpVar()
|
||||
case t == "Coord":
|
||||
// Convert a COORD into a uintptr (by fooling the type system). This code
|
||||
// assumes the two SHORTs are correctly laid out; the "cast" to uint32 is
|
||||
// just to get a pointer to pass.
|
||||
s = fmt.Sprintf("*((*uint32)(unsafe.Pointer(&%s)))", p.Name)
|
||||
case strings.HasPrefix(t, "[]"):
|
||||
return []string{
|
||||
fmt.Sprintf("uintptr(unsafe.Pointer(%s))", p.tmpVar()),
|
||||
|
||||
Reference in New Issue
Block a user