Skip to content

Commit

Permalink
rename ctypes._FuncPtr
Browse files Browse the repository at this point in the history
  • Loading branch information
tungol committed Dec 24, 2024
1 parent 17408ee commit 3a76556
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stdlib/ctypes/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ class ArgumentError(Exception): ...
# defined within CDLL.__init__
# Runtime name is ctypes.CDLL.__init__.<locals>._FuncPtr
@type_check_only
class _FuncPtr(_CFuncPtr):
class _CDLLFuncPointer(_CFuncPtr):
_flags_: ClassVar[int]
_restype_: ClassVar[type[_CDataType]]

# Not a real class; _FuncPtr with a __name__ set on it.
# Not a real class; _CDLLFuncPointer with a __name__ set on it.
@type_check_only
class _NamedFuncPointer(_FuncPtr):
class _NamedFuncPointer(_CDLLFuncPointer):
__name__: str

class CDLL:
_func_flags_: ClassVar[int]
_func_restype_: ClassVar[type[_CDataType]]
_name: str
_handle: int
_FuncPtr: type[_FuncPtr]
_FuncPtr: type[_CDLLFuncPointer]
def __init__(
self,
name: str | None,
Expand Down Expand Up @@ -108,7 +108,7 @@ class _CFunctionType(_CFuncPtr):
_flags_: ClassVar[int]

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

def CFUNCTYPE(
restype: type[_CData | _CDataType] | None,
Expand Down

0 comments on commit 3a76556

Please sign in to comment.