fix: segfalt in json_get_object_item

This commit is contained in:
2025-03-22 03:18:34 +00:00
parent bcaca5038d
commit 27e42e9010
6 changed files with 32 additions and 49 deletions

View File

@@ -6,17 +6,16 @@
#include <string.h>
#include <unistd.h>
#include "chectic.h"
#include "cjson/cJSON.h"
void init_cjson_with_arenas(Arena *arena);
char *eval(Arena *arena, const cJSON * const context, const char * const key);
char *eval(Arena *arena, const Json * const context, const char * const key);
/* Modified: text is passed by reference so we can update it and free old allocations */
void render_template_placeholders(Arena *arena, char **text_ptr, cJSON *context, const char * const prefix);
void render_template_placeholders(Arena *arena, char **text_ptr, Json *context, const char * const prefix);
void render_template_with_arena(Arena *arena, char **text, const cJSON * const ccontext);
void render_template_with_arena(Arena *arena, char **text, const Json * const ccontext);
void render_template(char **text, const cJSON * const context);
void render_template(char **text, const Json * const context);
#endif // EPRINTF_HMPL