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

Method _indexed

src/pointers/malloc.py:41–47  ·  view source on GitHub ↗
(self, amount: int)

Source from the content-addressed store, hash-verified

39 self._parent: AllocatedPointer[T] | None = parent
40
41 def _indexed(self, amount: int) -> AllocatedPointer[T]:
42 return AllocatedPointer(
43 self.ensure() + amount,
44 self.size - amount,
45 self.assigned,
46 parent=self._parent,
47 )
48
49 def _get_parent(self) -> AllocatedPointer[T]:
50 parent = self

Callers 4

__add__Method · 0.95
__sub__Method · 0.95
__getitem__Method · 0.95
__setitem__Method · 0.95

Calls 2

AllocatedPointerClass · 0.85
ensureMethod · 0.45

Tested by

no test coverage detected