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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl

Issue 397453004: Mojo: Correctly handle large unsigned integer literals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ULL Created 6 years, 5 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: mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
index 8cf8e99713cc69e9518ca3defba9a6bcdafb4271..66b717e7fbb578ec3483b7f9042d233532377b9f 100644
--- a/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl
@@ -22,7 +22,7 @@ namespace {{namespace}} {
{#--- Constants #}
{% for constant in module.constants %}
-const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant.value|expression_to_text}};
+const {{constant.kind|cpp_pod_type}} {{constant.name}} = {{constant|constant_value}};
{%- endfor %}
namespace internal {
@@ -58,7 +58,7 @@ const uint32_t {{method_name}} = {{method.ordinal}};
{#--- Struct Constants #}
{%- for struct in structs %}
{% for constant in struct.constants %}
-const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant.value|expression_to_text}};
+const {{constant.kind|cpp_pod_type}} {{struct.name}}::{{constant.name}} = {{constant|constant_value}};
{%- endfor %}
{%- endfor %}

Powered by Google App Engine
This is Rietveld 408576698