Pass this allocator to yyjson_write_opts or yyjson_mut_write_opts. The * resulting string must be released with cbm_free(CBM_MEM_CLASS_OTHER, ...). * The document itself retains whichever allocator created it. */
| 26 | * resulting string must be released with cbm_free(CBM_MEM_CLASS_OTHER, ...). |
| 27 | * The document itself retains whichever allocator created it. */ |
| 28 | static inline const yyjson_alc *cbm_json_writer_allocator(void) { |
| 29 | static const yyjson_alc allocator = {cbm_json_writer_malloc, cbm_json_writer_realloc, |
| 30 | cbm_json_writer_free, NULL}; |
| 31 | return &allocator; |
| 32 | } |
| 33 | |
| 34 | #endif /* CBM_JSON_WRITER_H */ |
no outgoing calls
no test coverage detected