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

Function vl_push

internal/cbm/pdf/pdf_obj.c:683–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

681} val_list_t;
682
683static void vl_push(val_list_t *l, pdf_val_t *x) {
684 if (l->fail) {
685 return;
686 }
687 if (l->n == l->cap) {
688 int ncap = l->cap ? l->cap * 2 : PDF_MAP_MIN;
689 pdf_val_t **g = (pdf_val_t **)cbm_realloc(CBM_MEM_CLASS_EXTRACT, (void *)l->v,
690 (size_t)ncap * sizeof(*g));
691 if (!g) {
692 l->fail = true;
693 return;
694 }
695 l->v = g;
696 l->cap = ncap;
697 }
698 l->v[l->n++] = x;
699}
700
701static pdf_val_t *vl_finish_array(pdf_doc_t *d, val_list_t *l) {
702 pdf_val_t *arr = NULL;

Callers 2

pdf_parse_valueFunction · 0.85
pdf_parse_content_arrayFunction · 0.85

Calls 1

cbm_reallocFunction · 0.85

Tested by

no test coverage detected