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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/module.py

Issue 605443002: The default value for NullableString should be null (was "") (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test fields with type double Created 6 years, 3 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/pylib/mojom/generate/module.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index cf5777932c5a272d564d92161b9b09f6dd52bc0b..06809ebef45fe80ca0b063602477d47fa9315eb2 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -334,6 +334,10 @@ def IsBoolKind(kind):
return kind.spec == BOOL.spec
+def IsFloatKind(kind):
+ return kind is not None and kind.spec == FLOAT.spec
yzshen1 2014/09/24 22:49:25 nit: All surrounding functions don't test kind is
hansmuller 2014/09/24 23:33:11 I've moved to the "is not None" test to the call s
+
+
def IsStringKind(kind):
return kind.spec == STRING.spec or kind.spec == NULLABLE_STRING.spec

Powered by Google App Engine
This is Rietveld 408576698