internal/wayland: remove fd typecasts
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m21s
Test / Hakurei (push) Successful in 3m14s
Test / Hpkg (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 4m18s
Test / Hakurei (race detector) (push) Successful in 5m5s
Test / Flake checks (push) Successful in 1m24s

These are no longer necessary since RawConn is no longer used.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-11-16 01:45:37 +09:00
parent 61972d61f6
commit 00771efeb4
4 changed files with 27 additions and 11 deletions

View File

@@ -117,19 +117,26 @@ func (e *Error) Error() string {
}
}
// bindWaylandFd calls hakurei_bind_wayland_fd. A non-nil error has concrete type [Error].
func bindWaylandFd(socketPath string, fd uintptr, appID, instanceID string, syncFd uintptr) error {
// securityContextBind calls hakurei_security_context_bind.
//
// A non-nil error has concrete type [Error].
func securityContextBind(
socketPath string,
serverFd int,
appID, instanceID string,
closeFd int,
) error {
if hasNull(appID) || hasNull(instanceID) {
return syscall.EINVAL
}
var e Error
e.Cause, e.Errno = C.hakurei_bind_wayland_fd(
e.Cause, e.Errno = C.hakurei_security_context_bind(
C.CString(socketPath),
C.int(fd),
C.int(serverFd),
C.CString(appID),
C.CString(instanceID),
C.int(syncFd),
C.int(closeFd),
)
if e.Cause == RSuccess {