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

Function Hasher_new

python/stringzilla.c:5867–5875  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5865static void Hasher_dealloc(Hasher *self) { Py_TYPE(self)->tp_free((PyObject *)self); }
5866
5867static PyObject *Hasher_new(PyTypeObject *type, PyObject *args, PyObject *kwds) {
5868 (void)args;
5869 (void)kwds;
5870 Hasher *self = (Hasher *)type->tp_alloc(type, 0);
5871 if (!self) return NULL;
5872 self->seed = 0;
5873 sz_hash_state_init(&self->state, self->seed);
5874 return (PyObject *)self;
5875}
5876
5877static int Hasher_init(Hasher *self, PyObject *args, PyObject *kwargs) {
5878 // Positional seed

Callers

nothing calls this directly

Calls 1

sz_hash_state_initFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…