MCPcopy Create free account
hub / github.com/ZeroIntensity/pointers.py / _as_parameter_

Method _as_parameter_

src/pointers/structure.py:194–202  ·  view source on GitHub ↗
(
        self,
    )

Source from the content-addressed store, hash-verified

192 @property # type: ignore
193 @handle
194 def _as_parameter_(
195 self,
196 ) -> Union[int, "ctypes._PointerLike"]:
197 existing = self._existing
198
199 if existing:
200 return ctypes.pointer(existing.struct)
201
202 return self.ensure()
203
204 def __repr__(self) -> str:
205 return f"StructPointer(address={self.address}, existing={self._existing!r})" # noqa

Callers

nothing calls this directly

Calls 1

ensureMethod · 0.45

Tested by

no test coverage detected