From bf6403c8036bcfad9317c5b419387d9ba3f3bb29 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 13 Oct 2026 10:19:11 +0800 Subject: [PATCH] =?UTF-8?q?fix(socket):=20accept/socket=20=E9=9D=9E=20Wind?= =?UTF-8?q?ows=20=E5=88=86=E6=94=AF=E8=A1=A5=E9=BD=90=20u64=E2=86=92INT=20?= =?UTF-8?q?=E6=98=BE=E5=BC=8F=E7=AA=84=E5=8C=96=EF=BC=88out=5Fclient.fd=20?= =?UTF-8?q?/=20return=20/=20out=5Fsock.fd=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- socket.vp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/socket.vp b/socket.vp index 77487dc..09779f1 100644 --- a/socket.vp +++ b/socket.vp @@ -337,11 +337,11 @@ class Socket: client_fd: INT = INT(accept(self.fd, &addr, &addrlen)) if client_fd == SOCKET_ERROR: return SOCKET_ERROR - out_client.fd = client_fd + out_client.fd = INT(client_fd) out_client.family = self.family out_client.type = self.type out_client.protocol = self.protocol - return client_fd + return INT(client_fd) def settimeout(self, timeout_ms: INT) -> INT: """Set timeout for receive and send operations (milliseconds). @@ -408,7 +408,7 @@ def SocketCreate(family: INT, type: INT, protocol: INT, out_sock: Socket*) -> IN if fd == win32.winsock2.INVALID_SOCKET: return -1 else: fd: INT = INT(socket(family, type, protocol)) - out_sock.fd = fd + out_sock.fd = INT(fd) if fd == INVALID_SOCKET: return -1 return 0