blob: 57e5cbf0c67692d8fa395e62bc2dc6d952e34bc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/third-party/nanopb/generator/nanopb_generator.py b/third-party/nanopb/generator/nanopb_generator.py
index 6068042..b3525d2 100755
--- a/third-party/nanopb/generator/nanopb_generator.py
+++ b/third-party/nanopb/generator/nanopb_generator.py
@@ -34,7 +34,7 @@ try:
import google.protobuf.text_format as text_format
import google.protobuf.descriptor_pb2 as descriptor
import google.protobuf.compiler.plugin_pb2 as plugin_pb2
- import google.protobuf.reflection as reflection
+ import google.protobuf.message_factory as message_factory
import google.protobuf.descriptor
except:
sys.stderr.write('''
@@ -1689,7 +1689,7 @@ class Message(ProtoElement):
optional_only.name += str(id(self))
desc = google.protobuf.descriptor.MakeDescriptor(optional_only)
- msg = reflection.MakeClass(desc)()
+ msg = message_factory.GetMessageClass(desc)()
for field in optional_only.field:
if field.type == FieldD.TYPE_STRING:
|