| 19425 | } |
| 19426 | |
| 19427 | static bool gguf_fread_str(FILE * file, struct gguf_str * p, size_t * offset) { |
| 19428 | p->n = 0; |
| 19429 | p->data = NULL; |
| 19430 | |
| 19431 | bool ok = true; |
| 19432 | |
| 19433 | ok = ok && gguf_fread_el(file, &p->n, sizeof(p->n), offset); p->data = calloc(p->n + 1, 1); |
| 19434 | ok = ok && gguf_fread_el(file, p->data, p->n, offset); |
| 19435 | |
| 19436 | return ok; |
| 19437 | } |
| 19438 | |
| 19439 | struct gguf_context * gguf_init_empty(void) { |
| 19440 | struct gguf_context * ctx = GGML_ALIGNED_MALLOC(sizeof(struct gguf_context)); |
no test coverage detected