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

Method dereference

src/pointers/base_pointers.py:408–419  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

406
407 @handle
408 def dereference(self) -> T:
409 if self.freed:
410 raise FreedMemoryError(
411 "cannot dereference memory that has been freed",
412 )
413
414 if not self.assigned:
415 raise DereferenceError(
416 "cannot dereference allocated memory that has no value",
417 )
418
419 return deref(self.ensure())
420
421 @abstractmethod
422 def __add__(self, amount: int) -> "BaseAllocatedPointer[Any]":

Callers

nothing calls this directly

Calls 4

FreedMemoryErrorClass · 0.85
DereferenceErrorClass · 0.85
derefFunction · 0.85
ensureMethod · 0.45

Tested by

no test coverage detected