MCPcopy Index your code
hub / github.com/ZeroIntensity/pointers.py / to_voidp

Function to_voidp

src/pointers/c_pointer.py:255–258  ·  view source on GitHub ↗

Cast a typed pointer to a void pointer.

(ptr: TypedCPointer[Any])

Source from the content-addressed store, hash-verified

253
254
255def to_voidp(ptr: TypedCPointer[Any]) -> VoidPointer:
256 """Cast a typed pointer to a void pointer."""
257
258 return VoidPointer(ptr.ensure(), ptr.size)
259
260
261def to_c_ptr(data: T) -> TypedCPointer[T]:

Callers 1

_Function · 0.90

Calls 2

VoidPointerClass · 0.85
ensureMethod · 0.45

Tested by 1

_Function · 0.72