Internal Code Change

PiperOrigin-RevId: 532856964
pull/12561/head
Mike Kruskal 2 years ago committed by Copybara-Service
parent 1662245963
commit 734b2abcca
  1. 4
      python/google/protobuf/pyext/descriptor.cc

@ -621,8 +621,8 @@ static PyObject* GetExtensionRanges(PyBaseDescriptor *self, void *closure) {
for (int i = 0; i < descriptor->extension_range_count(); i++) { for (int i = 0; i < descriptor->extension_range_count(); i++) {
const Descriptor::ExtensionRange* range = descriptor->extension_range(i); const Descriptor::ExtensionRange* range = descriptor->extension_range(i);
PyObject* start = PyLong_FromLong(range->start); PyObject* start = PyLong_FromLong(range->start_number());
PyObject* end = PyLong_FromLong(range->end); PyObject* end = PyLong_FromLong(range->end_number());
PyList_SetItem(range_list, i, PyTuple_Pack(2, start, end)); PyList_SetItem(range_list, i, PyTuple_Pack(2, start, end));
} }

Loading…
Cancel
Save