Skip to content

ctypes._FuncPtr doesn't seem to exist as described in the doc (misspelled _CFuncType?) #120313

@vmonteco

Description

@vmonteco

Documentation

Module ctypes doesn't seem to provide _FuncPtr when imported.

However, it provides _CFuncType that really looks similar to _FuncPtr as described by the documentation according to help().

Help on class CFuncPtr in module _ctypes:

class CFuncPtr(_CData)
 |  Function Pointer
 |
 |  Method resolution order:
 |      CFuncPtr
 |      _CData
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __bool__(self, /)
 |      True if self else False
 |
 |  __buffer__(self, flags, /)
 |      Return a buffer object that exposes the underlying memory of the object.
 |
 |  __call__(self, /, *args, **kwargs)
 |      Call self as a function.
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  argtypes
 |      specify the argument types
 |
 |  errcheck
 |      a function to check for errors
 |
 |  restype
 |      specify the result type
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from _CData:
 |
 |  __ctypes_from_outparam__(...)
 |
 |  __hash__(self, /)
 |      Return hash(self).
 |
 |  __reduce__(...)
 |      Helper for pickle.
 |
 |  __setstate__(...)

Could it be a typo in the documentation?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions