MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / pdf_map_get

Function pdf_map_get

internal/cbm/pdf/pdf_obj.c:201–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201int64_t pdf_map_get(const pdf_map_t *m, uint64_t key) {
202 if (!m->cap) {
203 return -1;
204 }
205 uint32_t mask = m->cap - 1;
206 uint32_t i = (uint32_t)map_mix(key) & mask;
207 while (m->vals[i] >= 0) {
208 if (m->keys[i] == key) {
209 return m->vals[i];
210 }
211 i = (i + 1) & mask;
212 }
213 return -1;
214}
215
216static bool map_grow(pdf_map_t *m) {
217 uint32_t ncap = m->cap ? m->cap * 2 : PDF_MAP_MIN;

Callers 7

pdf_font_forFunction · 0.85
do_xobjectFunction · 0.85
collect_pagesFunction · 0.85
xentFunction · 0.85
pdf_getFunction · 0.85
xref_slotFunction · 0.85
load_xrefFunction · 0.85

Calls 1

map_mixFunction · 0.85

Tested by

no test coverage detected