Backed out Reify() signature change.

pull/13171/head
Joshua Haberman 3 years ago
parent fff8dfb035
commit 5953ac4736
  1. 1
      python/map.h
  2. 3
      python/repeated.c
  3. 3
      python/repeated.h

@ -47,6 +47,7 @@ PyObject* PyUpb_MapContainer_GetOrCreateWrapper(upb_map* map,
PyObject* arena);
// Reifies a map stub to point to the concrete data in `map`.
// If `map` is NULL, an appropriate empty map will be constructed.
void PyUpb_MapContainer_Reify(PyObject* self, upb_map* map);
// Reifies this map object if it is not already reified.

@ -106,7 +106,7 @@ static upb_array* PyUpb_RepeatedContainer_GetIfReified(
return PyUpb_RepeatedContainer_IsStub(self) ? NULL : self->ptr.arr;
}
upb_array* PyUpb_RepeatedContainer_Reify(PyObject* _self, upb_array* arr) {
void PyUpb_RepeatedContainer_Reify(PyObject* _self, upb_array* arr) {
PyUpb_RepeatedContainer* self = (PyUpb_RepeatedContainer*)_self;
assert(PyUpb_RepeatedContainer_IsStub(self));
if (!arr) {
@ -119,7 +119,6 @@ upb_array* PyUpb_RepeatedContainer_Reify(PyObject* _self, upb_array* arr) {
self->ptr.arr = arr; // Overwrites self->ptr.parent.
self->field &= ~(uintptr_t)1;
assert(!PyUpb_RepeatedContainer_IsStub(self));
return arr;
}
upb_array* PyUpb_RepeatedContainer_EnsureReified(PyObject* _self) {

@ -48,7 +48,8 @@ PyObject* PyUpb_RepeatedContainer_GetOrCreateWrapper(upb_array* arr,
PyObject* arena);
// Reifies a repeated field stub to point to the concrete data in `arr`.
upb_array* PyUpb_RepeatedContainer_Reify(PyObject* self, upb_array* arr);
// If `arr` is NULL, an appropriate empty array will be constructed.
void PyUpb_RepeatedContainer_Reify(PyObject* self, upb_array* arr);
// Reifies this repeated object if it is not already reified.
upb_array* PyUpb_RepeatedContainer_EnsureReified(PyObject* self);

Loading…
Cancel
Save