summaryrefslogtreecommitdiff
path: root/src/upb_array.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-07-22 19:49:53 -0700
committerJoshua Haberman <joshua@reverberate.org>2009-07-22 19:49:53 -0700
commitee1ed1ccb87effa403dc91603d452d4c98ed716f (patch)
treee1ee8c1b38d9351d4d3494c5e45b91b288f3a081 /src/upb_array.h
parente4e89247e5f7548b5ebdb9a667657cdcb3feb17f (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.h6
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 { \
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback