MCPcopy Index your code
hub / github.com/endbasic/endbasic / empty_text_ptr

Method empty_text_ptr

core/src/mem.rs:244–247  ·  view source on GitHub ↗

Returns the pointer to the shared empty string.

(&self)

Source from the content-addressed store, hash-verified

242
243 /// Returns the pointer to the shared empty string.
244 pub(crate) fn empty_text_ptr(&self) -> u64 {
245 debug_assert!(matches!(self.data.first(), Some(HeapDatum::Text(s)) if s.is_empty()));
246 DatumPtr::for_heap(0)
247 }
248
249 /// Allocates `datum` in the heap and returns its pointer.
250 pub(crate) fn push(&mut self, datum: HeapDatum) -> Result<u64, HeapOverflowError> {

Callers 2

pushMethod · 0.80
do_allocMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected