diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-07-22 19:49:53 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-07-22 19:49:53 -0700 |
commit | ee1ed1ccb87effa403dc91603d452d4c98ed716f (patch) | |
tree | e1ee8c1b38d9351d4d3494c5e45b91b288f3a081 /src/upb_array.h | |
parent | e4e89247e5f7548b5ebdb9a667657cdcb3feb17f (diff) |
Compiler finally works (except string arrays). Untested. Holy crap that was a lot of work.
Diffstat (limited to 'src/upb_array.h')
-rw-r--r-- | src/upb_array.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 { \ |