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

Unified Diff: third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 months 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/src/google/protobuf/compiler/python/python_generator.cc
diff --git a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc
index 4d500f90e9cc591a676ceef90fb6d37f6da41072..0553dd0d9d37456e0255cc80ecafbfce503f2583 100644
--- a/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc
+++ b/third_party/protobuf/src/google/protobuf/compiler/python/python_generator.cc
@@ -235,7 +235,7 @@ string StringifyDefaultValue(const FieldDescriptor& field) {
// infinity * 0 = nan
return "(1e10000 * 0)";
} else {
- return SimpleDtoa(value);
+ return "float(" + SimpleDtoa(value) + ")";
}
}
case FieldDescriptor::CPPTYPE_FLOAT: {
@@ -251,7 +251,7 @@ string StringifyDefaultValue(const FieldDescriptor& field) {
// infinity - infinity = nan
return "(1e10000 * 0)";
} else {
- return SimpleFtoa(value);
+ return "float(" + SimpleFtoa(value) + ")";
}
}
case FieldDescriptor::CPPTYPE_BOOL:

Powered by Google App Engine
This is Rietveld 408576698