From cf3ea5b6e651cea36c3539f66fdb33b585fc85d8 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 28 Feb 2022 18:00:16 -0800 Subject: [PATCH] ctypes.memmove and memset return ints (#7407) They actually return pointers, but ctypes turns them into ints. Fixes #7406 --- stdlib/ctypes/__init__.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/ctypes/__init__.pyi b/stdlib/ctypes/__init__.pyi index 88a9567e1..f257769f5 100644 --- a/stdlib/ctypes/__init__.pyi +++ b/stdlib/ctypes/__init__.pyi @@ -165,8 +165,8 @@ def get_errno() -> int: ... if sys.platform == "win32": def get_last_error() -> int: ... -def memmove(dst: _CVoidPLike, src: _CVoidConstPLike, count: int) -> None: ... -def memset(dst: _CVoidPLike, c: int, count: int) -> None: ... +def memmove(dst: _CVoidPLike, src: _CVoidConstPLike, count: int) -> int: ... +def memset(dst: _CVoidPLike, c: int, count: int) -> int: ... def POINTER(type: type[_CT]) -> type[pointer[_CT]]: ... # The real ctypes.pointer is a function, not a class. The stub version of pointer behaves like