Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc
diff --git a/third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc b/third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc
index 4f339e77235413e278e3074bbe0deb347b1291ba..43a2bc12d97daf74bc8960eb1c40c21a49a4bf64 100644
--- a/third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc
+++ b/third_party/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc
@@ -146,7 +146,7 @@ static PyObject* AddToAttached(RepeatedCompositeContainer* self,
cmsg->owner = self->owner;
cmsg->message = sub_message;
cmsg->parent = self->parent;
- if (cmessage::InitAttributes(cmsg, kwargs) < 0) {
+ if (cmessage::InitAttributes(cmsg, args, kwargs) < 0) {
Py_DECREF(cmsg);
return NULL;
}
@@ -166,7 +166,7 @@ static PyObject* AddToReleased(RepeatedCompositeContainer* self,
// Create a new Message detached from the rest.
PyObject* py_cmsg = PyEval_CallObjectWithKeywords(
- self->child_message_class->AsPyObject(), NULL, kwargs);
+ self->child_message_class->AsPyObject(), args, kwargs);
if (py_cmsg == NULL)
return NULL;
@@ -364,7 +364,7 @@ static int SortPythonMessages(RepeatedCompositeContainer* self,
ScopedPyObjectPtr m(PyObject_GetAttrString(self->child_messages, "sort"));
if (m == NULL)
return -1;
- if (PyObject_Call(m.get(), args, kwds) == NULL)
+ if (ScopedPyObjectPtr(PyObject_Call(m.get(), args, kwds)) == NULL)
return -1;
if (self->message != NULL) {
ReorderAttached(self);

Powered by Google App Engine
This is Rietveld 408576698