Skip to content

Commit

Permalink
Merge pull request protocolbuffers#49 from mbarbon/add-fielddef-index
Browse files Browse the repository at this point in the history
Add missing FieldDef::index() definition
  • Loading branch information
haberman committed Feb 21, 2016
2 parents 79938f3 + 15c7761 commit f73baf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion upb/def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f73baf6

Please sign in to comment.