Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index 7ad89b54b406ac6d9f16c728b82f35cccbc84d7c..95c9960e694d2dbb4e039b982da6c65fae53650a 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -120,6 +120,19 @@ CPP_SPECIAL_CONVERSION_RULES = { |
} |
+def cpp_type_initializer(idl_type): |
+ """Returns a string containing a C++ initialization statement for the |
+ corresponding type. |
+ |
+ |idl_type| argument is of type IdlType. |
+ """ |
+ |
+ if (idl_type.is_numeric_type): |
+ return ' = 0' |
+ if idl_type.base_type == 'boolean': |
+ return ' = false' |
+ return '' |
Jens Widell
2014/07/16 07:25:10
Return None by default?
Mostyn Bramley-Moore
2014/07/16 07:46:56
If I do that then we can't blindly use {{attribute
|
+ |
Jens Widell
2014/07/16 07:25:10
Two blank lines between function definitions.
I'd
Mostyn Bramley-Moore
2014/07/16 07:46:56
Done.
|
def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_argument=False, used_as_variadic_argument=False, used_in_cpp_sequence=False): |
"""Returns C++ type corresponding to IDL type. |