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

Function Hasher_update

python/stringzilla.c:5919–5929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5917}
5918
5919static PyObject *Hasher_update(PyObject *self_obj, PyObject *arg) {
5920 Hasher *self = (Hasher *)self_obj;
5921 sz_string_view_t text;
5922 if (!sz_py_export_string_like(arg, &text.start, &text.length)) {
5923 wrap_current_exception("Argument must be string-like");
5924 return NULL;
5925 }
5926 sz_hash_state_update(&self->state, text.start, text.length);
5927 Py_INCREF(self_obj);
5928 return self_obj;
5929}
5930
5931static PyObject *Hasher_digest(PyObject *self_obj, PyObject *noargs) {
5932 sz_unused_(noargs);

Callers

nothing calls this directly

Calls 3

sz_py_export_string_likeFunction · 0.85
wrap_current_exceptionFunction · 0.85
sz_hash_state_updateFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…