Return (heap_offset, length, mtime_ns) from a data slot.
(self, offset)
| 953 | return raw[:null_pos] if null_pos != -1 else raw |
| 954 | |
| 955 | def _read_slot_pointer(self, offset): |
| 956 | """Return (heap_offset, length, mtime_ns) from a data slot.""" |
| 957 | base = offset + self._offset_off |
| 958 | heap_offset = struct.unpack_from(_OFFSET_FMT, self._mm, base)[0] |
| 959 | length = struct.unpack_from(_LENGTH_FMT, self._mm, base + _OFFSET_SIZE)[0] |
| 960 | mtime_ns = struct.unpack_from( |
| 961 | _MTIME_FMT, self._mm, base + _OFFSET_SIZE + _LENGTH_SIZE |
| 962 | )[0] |
| 963 | return heap_offset, length, mtime_ns |
| 964 | |
| 965 | def _write_slot(self, offset, key_bytes, heap_offset, length, mtime_ns): |
| 966 | """Write key + pointer fields into a data slot (does NOT set STATUS).""" |
no outgoing calls
no test coverage detected