Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle oneof fields in DefBuilder #50

Closed
wants to merge 2 commits into from

Conversation

mbarbon
Copy link
Contributor

@mbarbon mbarbon commented Feb 21, 2016

No description provided.

@@ -94,9 +94,23 @@ const MessageDef* DefBuilder::GetMaybeUnfrozenMessageDef(
fields.push_back(d->field(i));
}

// Oneof fields
for (int i = 0, maxi = d->oneof_decl_count(); i < maxi; ++i) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap in #ifdef GOOGLE_PROTOBUF_HAS_ONEOF so it can compile against protobuf < 2.6.0 (which introduced oneof support).

@mbarbon
Copy link
Contributor Author

mbarbon commented Feb 22, 2016

Sorry about that. Added #ifdefs (not actually tested with an old protobuf release, though).

@coveralls
Copy link

coveralls commented May 21, 2016

Coverage Status

Changes Unknown when pulling 9a0cee2 on mbarbon:bridge-oneof into ** on google:master**.

@haberman
Copy link
Member

Thanks for the contribution -- sorry I didn't merge it at the time. Since then I have removed this functionality: now to convert between protobuf descriptors and upb descriptors you just serialize and parse.

@haberman haberman closed this May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants