MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / Strs_get_tape_address

Function Strs_get_tape_address

python/stringzilla.c:1893–1906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1891}
1892
1893static PyObject *Strs_get_tape_address(Strs *self, void *closure) {
1894 if (!Strs_ensure_tape_layout(self)) return NULL;
1895
1896 sz_cptr_t tape_ptr = NULL;
1897 switch (self->layout) {
1898 case STRS_U32_TAPE_VIEW: tape_ptr = self->data.u32_tape_view.data; break;
1899 case STRS_U32_TAPE: tape_ptr = self->data.u32_tape.data; break;
1900 case STRS_U64_TAPE_VIEW: tape_ptr = self->data.u64_tape_view.data; break;
1901 case STRS_U64_TAPE: tape_ptr = self->data.u64_tape.data; break;
1902 default: PyErr_SetString(PyExc_RuntimeError, "Unknown Strs layout"); return NULL;
1903 }
1904
1905 return PyLong_FromSize_t((sz_size_t)tape_ptr);
1906}
1907
1908static PyObject *Strs_get_offsets_address(Strs *self, void *closure) {
1909 if (!Strs_ensure_tape_layout(self)) return NULL;

Callers

nothing calls this directly

Calls 1

Strs_ensure_tape_layoutFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…