summaryrefslogtreecommitdiff
path: root/upb/bindings/googlepb
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2015-05-08 16:56:29 -0700
committerJosh Haberman <jhaberman@gmail.com>2015-05-08 16:56:29 -0700
commit3bd691a4975b2267ff04611507e766a7f9f87e83 (patch)
treee5628144f6f920d9ccf792a1499e55503e6ff4d2 /upb/bindings/googlepb
parent87fc2c516bff207f880c71526926842fd8dcc77e (diff)
Google-internal development.
Diffstat (limited to 'upb/bindings/googlepb')
-rw-r--r--upb/bindings/googlepb/bridge.cc3
-rw-r--r--upb/bindings/googlepb/proto2.cc9
2 files changed, 9 insertions, 3 deletions
diff --git a/upb/bindings/googlepb/bridge.cc b/upb/bindings/googlepb/bridge.cc
index 6ae8868..2a2bbbf 100644
--- a/upb/bindings/googlepb/bridge.cc
+++ b/upb/bindings/googlepb/bridge.cc
@@ -246,7 +246,8 @@ const Handlers* CodeCache::GetMaybeUnfrozenWriteHandlers(
to_freeze_.push_back(h);
const goog::Descriptor* d = m.GetDescriptor();
- for (upb::MessageDef::const_iterator i = md->begin(); i != md->end(); ++i) {
+ for (upb::MessageDef::const_field_iterator i = md->field_begin();
+ i != md->field_end(); ++i) {
const FieldDef* upb_f = *i;
const goog::FieldDescriptor* proto2_f =
diff --git a/upb/bindings/googlepb/proto2.cc b/upb/bindings/googlepb/proto2.cc
index 3911172..87c13b6 100644
--- a/upb/bindings/googlepb/proto2.cc
+++ b/upb/bindings/googlepb/proto2.cc
@@ -946,14 +946,14 @@ case goog::FieldDescriptor::cpptype: \
public:
typedef goog::Message Type;
#ifdef GOOGLE_PROTOBUF_HAS_ARENAS
- static ::proto2::Arena* GetArena(Type* t) {
+ static goog::Arena* GetArena(Type* t) {
return t->GetArena();
}
static void* GetMaybeArenaPointer(Type* t) {
return t->GetMaybeArenaPointer();
}
static inline Type* NewFromPrototype(
- const Type* prototype, ::proto2::Arena* arena = NULL) {
+ const Type* prototype, goog::Arena* arena = NULL) {
return prototype->New(arena);
}
static void Delete(Type* t, goog::Arena* arena = NULL) {
@@ -1277,6 +1277,11 @@ case goog::FieldDescriptor::cpptype: \
return lazy_field_.SetAllocated(static_cast<proto2::Message*>(message));
}
+ virtual void UnsafeArenaSetAllocatedMessage(proto2::MessageLite* message) {
+ return lazy_field_.UnsafeArenaSetAllocated(
+ static_cast<proto2::Message*>(message));
+ }
+
virtual proto2::MessageLite* ReleaseMessage(
const proto2::MessageLite& prototype) {
return lazy_field_.ReleaseByPrototype(
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback