diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-02-21 11:55:54 -0800 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-02-21 11:55:54 -0800 |
commit | f73baf670e8b14ef15fedfaa593ba71ba94dcfc8 (patch) | |
tree | 4e2fa451457d5b53e1954c77402911cf3f840461 | |
parent | 79938f3590be2be2cb4e8952a59440a79faa5a50 (diff) | |
parent | 15c77612d0ca00943d16c103899361ab42ea8d56 (diff) |
Merge pull request #49 from mbarbon/add-fielddef-index
Add missing FieldDef::index() definition
-rw-r--r-- | upb/def.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -348,7 +348,7 @@ class upb::FieldDef { * whatever message this field belongs to. Guaranteed to be less than * f->containing_type()->field_count(). May only be accessed once the def has * been finalized. */ - int index() const; + uint32_t index() const; /* The MessageDef to which this field belongs. * @@ -1362,6 +1362,9 @@ inline void FieldDef::set_lazy(bool lazy) { inline bool FieldDef::packed() const { return upb_fielddef_packed(this); } +inline uint32_t FieldDef::index() const { + return upb_fielddef_index(this); +} inline void FieldDef::set_packed(bool packed) { upb_fielddef_setpacked(this, packed); } |