From ee1ed1ccb87effa403dc91603d452d4c98ed716f Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Wed, 22 Jul 2009 19:49:53 -0700 Subject: Compiler finally works (except string arrays). Untested. Holy crap that was a lot of work. --- src/upb_array.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/upb_array.h') diff --git a/src/upb_array.h b/src/upb_array.h index 4282a7f..0e5178f 100644 --- a/src/upb_array.h +++ b/src/upb_array.h @@ -34,6 +34,12 @@ INLINE union upb_value_ptr upb_array_getelementptr( return ptr; } +INLINE union upb_value upb_array_getelement( + struct upb_array *arr, uint32_t n, upb_field_type_t type) +{ + return upb_deref(upb_array_getelementptr(arr, n, type), type); +} + /* These are all overlays on upb_array, pointers between them can be cast. */ #define UPB_DEFINE_ARRAY_TYPE(name, type) \ struct name ## _array { \ -- cgit v1.2.3