8000 move and rename from `ctypes._FuncPointer` to `_ctypes.CFuncPtr` by junkmd · Pull Request #10140 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

move and rename from ctypes._FuncPointer to _ctypes.CFuncPtr #10140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update classname from _FuncPointer to CFuncPtr
  • Loading branch information
junkmd committed May 3, 2023
commit 10fc7d727d6bf57476f3d125d23ded7cb7a2ea02
4 changes: 2 additions & 2 deletions stdlib/_ctypes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ class _CArgObject: ...

def byref(obj: _CData, offset: int = ...) -> _CArgObject: ...

_ECT: TypeAlias = Callable[[type[_CData] | None, _FuncPointer, tuple[_CData, ...]], _CData]
_ECT: TypeAlias = Callable[[type[_CData] | None, CFuncPtr, tuple[_CData, ...]], _CData]
_PF: TypeAlias = tuple[int] | tuple[int, str] | tuple[int, str, Any]

class _FuncPointer(_PointerLike, _CData):
class CFuncPtr(_PointerLike, _CData):
restype: type[_CData] | Callable[[int], Any] | None
argtypes: Sequence[type[_CData]]
errcheck: _ECT
Expand Down
2 changes: 1 addition & 1 deletion stdlib/ctypes/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ from _ctypes import (
RTLD_LOCAL as RTLD_LOCAL,
ArgumentError as ArgumentError,
Array as Array,
CFuncPtr as _FuncPointer,
Structure as Structure,
Union as Union,
_CanCastTo as _CanCastTo,
_CArgObject as _CArgObject,
_CData as _CData,
_CDataMeta as _CDataMeta,
_CField as _CField,
_FuncPointer as _FuncPointer,
_Pointer as _Pointer,
_PointerLike as _PointerLike,
_SimpleCData as _SimpleCData,
Expand Down
0