Index: compiled/bindings.ipp |
=================================================================== |
--- a/compiled/bindings.ipp |
+++ b/compiled/bindings.ipp |
@@ -436,16 +436,18 @@ namespace bindings_internal |
result += " var type = HEAP32[result + " + std::to_string(offset)+ " >> 2];\n"; |
result += " if (type in " + cls.name + "_mapping)\n"; |
result += " result = new (exports[" + cls.name + "_mapping[type]])(result);\n"; |
result += " else\n"; |
result += " throw new Error('Unexpected " + cls.name + " type: ' + type);\n"; |
} |
result += " }\n"; |
+ result += " else\n"; |
+ result += " result = null;\n"; |
Wladimir Palant
2017/03/16 18:31:23
This isn't strictly necessary but expecting 0 as r
|
return result; |
} |
else |
throw std::runtime_error("Unexpected return type for " + std::string(call.name)); |
} |
const std::string wrapCall(const FunctionInfo& call) |
{ |