summaryrefslogtreecommitdiff
path: root/upb/json/printer.c
diff options
context:
space:
mode:
Diffstat (limited to 'upb/json/printer.c')
-rw-r--r--upb/json/printer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/upb/json/printer.c b/upb/json/printer.c
index 83f1a58..bc18055 100644
--- a/upb/json/printer.c
+++ b/upb/json/printer.c
@@ -1252,13 +1252,13 @@ static void json_printer_reset(upb_json_printer *p) {
/* Public API *****************************************************************/
-upb_json_printer *upb_json_printer_create(upb_env *e, const upb_handlers *h,
+upb_json_printer *upb_json_printer_create(upb_arena *a, const upb_handlers *h,
upb_bytessink output) {
#ifndef NDEBUG
- size_t size_before = upb_env_bytesallocated(e);
+ size_t size_before = upb_arena_bytesallocated(a);
#endif
- upb_json_printer *p = upb_env_malloc(e, sizeof(upb_json_printer));
+ upb_json_printer *p = upb_arena_malloc(a, sizeof(upb_json_printer));
if (!p) return NULL;
p->output_ = output;
@@ -1268,7 +1268,7 @@ upb_json_printer *upb_json_printer_create(upb_env *e, const upb_handlers *h,
p->nanos = 0;
/* If this fails, increase the value in printer.h. */
- UPB_ASSERT_DEBUGVAR(upb_env_bytesallocated(e) - size_before <=
+ UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(a) - size_before <=
UPB_JSON_PRINTER_SIZE);
return p;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback