From c8f6a27e6b27ed5d51cf6c8da5ec080b9952fa99 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 12 Aug 2018 19:23:26 -0700 Subject: Enforced that upb_msg lives in an Arena only, and other simplifying. upb_msg was trying to be general enough that it could either live in an arena or be allocated with malloc()/free(). This was too much complexity for too little benefit. We should commit to just saying that upb_msg is arena-only. I also ripped out the code to glue upb_msg to the existing handlers-based encoder/decoder. upb_msg has its own, small, simple encoder/decoder. I'm trying to whittle down upb_msg to a small and simple core. I updated the Lua extension for these changes. Lua needs some more work to properly create arenas per message. For now I just created a single global arena. --- upb/structs.int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/structs.int.h') diff --git a/upb/structs.int.h b/upb/structs.int.h index 242155b..6bc502e 100644 --- a/upb/structs.int.h +++ b/upb/structs.int.h @@ -11,7 +11,7 @@ struct upb_array { void *data; /* Each element is element_size. */ size_t len; /* Measured in elements. */ size_t size; /* Measured in elements. */ - upb_alloc *alloc; + upb_arena *arena; }; #endif /* UPB_STRUCTS_H_ */ -- cgit v1.2.3