Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc |
=================================================================== |
--- third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc (revision 216642) |
+++ third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc (working copy) |
@@ -78,11 +78,13 @@ |
// } |
// FOO_EXPORT is a macro which should expand to __declspec(dllexport) or |
// __declspec(dllimport) depending on what is being compiled. |
- string dllexport_decl; |
+ Options file_options; |
for (int i = 0; i < options.size(); i++) { |
if (options[i].first == "dllexport_decl") { |
- dllexport_decl = options[i].second; |
+ file_options.dllexport_decl = options[i].second; |
+ } else if (options[i].first == "safe_boundary_check") { |
+ file_options.safe_boundary_check = true; |
} else { |
*error = "Unknown generator option: " + options[i].first; |
return false; |
@@ -95,7 +97,7 @@ |
string basename = StripProto(file->name()); |
basename.append(".pb"); |
- FileGenerator file_generator(file, dllexport_decl); |
+ FileGenerator file_generator(file, file_options); |
// Generate header. |
{ |