Skip to content

Typing of ctypes' pointer types is wrong #8351

Closed
@svenpanne

Description

@svenpanne

https://docs.python.org/3/library/ctypes.html#pointers explicitly says:

Calling the pointer type without an argument creates a NULL pointer.

and even has a code example for this:

null_ptr = POINTER(c_int)()

But the pointer constructor

def __init__(self, arg: _CT) -> None: ...
requires an argument. This should be optional if I understand the code there correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions