summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--upb/upb.c5
-rw-r--r--upb/upb.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/upb/upb.c b/upb/upb.c
index 582e68f..8a9c4a7 100644
--- a/upb/upb.c
+++ b/upb/upb.c
@@ -280,6 +280,11 @@ void upb_env_init(upb_env *e) {
upb_env_initonly(e);
}
+void upb_env_init2(upb_env *e, void *mem, size_t n, upb_alloc *alloc) {
+ upb_arena_init2(&e->arena_, mem, n, alloc);
+ upb_env_initonly(e);
+}
+
void upb_env_uninit(upb_env *e) {
upb_arena_uninit(&e->arena_);
}
diff --git a/upb/upb.h b/upb/upb.h
index f7481a4..1ff47de 100644
--- a/upb/upb.h
+++ b/upb/upb.h
@@ -603,6 +603,7 @@ typedef bool upb_error_func(void *ud, const upb_status *status);
UPB_BEGIN_EXTERN_C
void upb_env_init(upb_env *e);
+void upb_env_init2(upb_env *e, void *mem, size_t n, upb_alloc *alloc);
void upb_env_uninit(upb_env *e);
void upb_env_initonly(upb_env *e);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback