From c2419764856e5666bfa9e3c1b87de29ec93babe1 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Mon, 21 Dec 2009 10:48:01 -0800 Subject: In the midst of a major refactoring. --- src/upb_mm.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/upb_mm.c') diff --git a/src/upb_mm.c b/src/upb_mm.c index 5f3cab0..f831671 100644 --- a/src/upb_mm.c +++ b/src/upb_mm.c @@ -17,30 +17,6 @@ static void upb_mm_destroy(union upb_value_ptr p, upb_mm_ptrtype type) } } -void upb_msg_destroy(struct upb_msg *msg) { - for(upb_field_count_t i = 0; i < msg->def->num_fields; i++) { - struct upb_fielddef *f = &msg->def->fields[i]; - if(!upb_msg_isset(msg, f) || !upb_field_ismm(f)) continue; - upb_mm_destroy(upb_msg_getptr(msg, f), upb_field_ptrtype(f)); - } - upb_def_unref(UPB_UPCAST(msg->def)); - free(msg); -} - -void upb_array_destroy(struct upb_array *arr) -{ - if(upb_elem_ismm(arr->fielddef)) { - upb_arraylen_t i; - /* Unref elements. */ - for(i = 0; i < arr->size; i++) { - union upb_value_ptr p = upb_array_getelementptr(arr, i); - upb_mm_destroy(p, upb_elem_ptrtype(arr->fielddef)); - } - } - if(arr->size != 0) free(arr->elements._void); - free(arr); -} - static union upb_mmptr upb_mm_newptr(upb_mm_ptrtype type, struct upb_fielddef *f) { -- cgit v1.2.3