Skip to content

Commit e5c5318

Browse files
authored
rename ctypes._FuncPtr (#13290)
fixes #13289
1 parent aaa8a7c commit e5c5318

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stdlib/ctypes/__init__.pyi

+5-5
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@ class ArgumentError(Exception): ...
4848
# defined within CDLL.__init__
4949
# Runtime name is ctypes.CDLL.__init__.<locals>._FuncPtr
5050
@type_check_only
51-
class _FuncPtr(_CFuncPtr):
51+
class _CDLLFuncPointer(_CFuncPtr):
5252
_flags_: ClassVar[int]
5353
_restype_: ClassVar[type[_CDataType]]
5454

55-
# Not a real class; _FuncPtr with a __name__ set on it.
55+
# Not a real class; _CDLLFuncPointer with a __name__ set on it.
5656
@type_check_only
57-
class _NamedFuncPointer(_FuncPtr):
57+
class _NamedFuncPointer(_CDLLFuncPointer):
5858
__name__: str
5959

6060
class CDLL:
6161
_func_flags_: ClassVar[int]
6262
_func_restype_: ClassVar[type[_CDataType]]
6363
_name: str
6464
_handle: int
65-
_FuncPtr: type[_FuncPtr]
65+
_FuncPtr: type[_CDLLFuncPointer]
6666
def __init__(
6767
self,
6868
name: str | None,
@@ -108,7 +108,7 @@ class _CFunctionType(_CFuncPtr):
108108
_flags_: ClassVar[int]
109109

110110
# Alias for either function pointer type
111-
_FuncPointer: TypeAlias = _FuncPtr | _CFunctionType # noqa: Y047 # not used here
111+
_FuncPointer: TypeAlias = _CDLLFuncPointer | _CFunctionType # noqa: Y047 # not used here
112112

113113
def CFUNCTYPE(
114114
restype: type[_CData | _CDataType] | None,

0 commit comments

Comments
 (0)