Index: Source/bindings/scripts/CodeGeneratorV8.pm |
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
index 487db19fd0ca7a6de41951d1e4c8922c314d0248..48f5c2cce613673806e14e2667acec12b76194d6 100644 |
--- a/Source/bindings/scripts/CodeGeneratorV8.pm |
+++ b/Source/bindings/scripts/CodeGeneratorV8.pm |
@@ -152,6 +152,8 @@ my %implementation; |
my %primitiveTypeHash = ("boolean" => 1, |
"void" => 1, |
"Date" => 1, |
+ "byte" => 1, |
+ "octet" => 1, |
"short" => 1, |
"long" => 1, |
"long long" => 1, |
@@ -4808,8 +4810,8 @@ sub GetNativeType |
return "float" if $type eq "float"; |
return "double" if $type eq "double"; |
- return "int" if $type eq "long" or $type eq "int" or $type eq "short" or $type eq "unsigned short"; |
- return "unsigned" if $type eq "unsigned long" or $type eq "unsigned int"; |
+ return "int" if $type eq "long" or $type eq "int" or $type eq "short" or $type eq "unsigned short" or $type eq "byte"; |
haraken
2013/06/13 14:45:30
Nit: Would you move the "unsigned short" to the be
|
+ return "unsigned" if $type eq "unsigned long" or $type eq "unsigned int" or $type eq "octet"; |
return "long long" if $type eq "long long"; |
return "unsigned long long" if $type eq "unsigned long long"; |
return "bool" if $type eq "boolean"; |
@@ -4874,11 +4876,15 @@ sub JSValueToNative |
return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double"; |
if ($intConversion ne "NormalConversion") { |
+ return "toInt8($value, $intConversion, ok)" if $type eq "byte"; |
+ return "toUInt8($value, $intConversion, ok)" if $type eq "octet"; |
return "toInt32($value, $intConversion, ok)" if $type eq "long" or $type eq "short"; |
return "toUInt32($value, $intConversion, ok)" if $type eq "unsigned long" or $type eq "unsigned short"; |
return "toInt64($value, $intConversion, ok)" if $type eq "long long"; |
return "toUInt64($value, $intConversion, ok)" if $type eq "unsigned long long"; |
} else { |
+ return "toInt8($value)" if $type eq "byte"; |
+ return "toUInt8($value)" if $type eq "octet"; |
return "toInt32($value)" if $type eq "long" or $type eq "short"; |
return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsigned short"; |
return "toInt64($value)" if $type eq "long long"; |