Index: Source/bindings/scripts/CodeGeneratorV8.pm |
diff --git a/Source/bindings/scripts/CodeGeneratorV8.pm b/Source/bindings/scripts/CodeGeneratorV8.pm |
index 8faa15454b74e9d04fe7a05789200d330d51a695..20c707afa75a135b5f330f7f8d49120caadf1c23 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, |
@@ -4827,8 +4829,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 "byte"; |
+ return "unsigned" if $type eq "unsigned long" or $type eq "unsigned int" or $type eq "unsigned short" 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"; |
@@ -4893,11 +4895,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"; |