Skip to content

Commit 04ec60a

Browse files
committed
Expose WSARecvFromInto default signature
Render the existing zero flags default while preserving the current Rust entry point and argument conversion order. Assisted-by: dot:frontier-intelligence
1 parent 18fc82b commit 04ec60a

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

‎crates/stdlib/src/overlapped.rs‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ mod _overlapped {
259259
}
260260
}
261261

262+
#[derive(FromArgs)]
263+
struct RecvFromIntoFlags {
264+
#[pyarg(positional, default)]
265+
flags: u32,
266+
}
267+
262268
#[pyclass(with(Constructor, Destructor))]
263269
impl Overlapped {
264270
#[pygetset]
@@ -1015,8 +1021,20 @@ mod _overlapped {
10151021
}
10161022
}
10171023

1018-
// WSARecvFromInto
1019-
#[pymethod]
1024+
// Preserve the Rust entry point used by existing tests while exposing
1025+
// the native default to Python's signature machinery.
1026+
#[pymethod(name = "WSARecvFromInto")]
1027+
fn recvfrom_into(
1028+
zelf: &Py<Self>,
1029+
handle: isize,
1030+
buf: ArgMemoryBuffer,
1031+
size: u32,
1032+
RecvFromIntoFlags { flags }: RecvFromIntoFlags,
1033+
vm: &VirtualMachine,
1034+
) -> PyResult {
1035+
Self::WSARecvFromInto(zelf, handle, buf, size, OptionalArg::Present(flags), vm)
1036+
}
1037+
10201038
fn WSARecvFromInto(
10211039
zelf: &Py<Self>,
10221040
handle: isize,

0 commit comments

Comments
 (0)