Skip to content

Commit 64d94f4

Browse files
authored
Update syscall_windows.go comments
1 parent 2537b32 commit 64d94f4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

windows/syscall_windows.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -1819,12 +1819,14 @@ type PSAPI_WORKING_SET_EX_INFORMATION struct {
18191819

18201820
// CreatePseudoConsole creates a windows pseudo console.
18211821
func CreatePseudoConsole(size Coord, in Handle, out Handle, flags uint32, pconsole *Handle) error {
1822-
// We need this wrapper as the function takes a COORD struct and not a pointer to one, so we need to cast to something beforehand.
1822+
// We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only
1823+
// accept arguments that can be casted to uintptr, and Coord can't.
18231824
return createPseudoConsole(*((*uint32)(unsafe.Pointer(&size))), in, out, flags, pconsole)
18241825
}
18251826

18261827
// ResizePseudoConsole resizes the internal buffers of the pseudo console to the width and height specified in `size`.
18271828
func ResizePseudoConsole(pconsole Handle, size Coord) error {
1828-
// We need this wrapper as the function takes a COORD struct and not a pointer to one, so we need to cast to something beforehand.
1829+
// We need this wrapper to manually cast Coord to uint32. The autogenerated wrappers only
1830+
// accept arguments that can be casted to uintptr, and Coord can't.
18291831
return resizePseudoConsole(pconsole, *((*uint32)(unsafe.Pointer(&size))))
18301832
}

0 commit comments

Comments
 (0)