Index: compiled/bindings/generator.cpp |
diff --git a/compiled/bindings/generator.cpp b/compiled/bindings/generator.cpp |
index ab6c504625e3f21b96ae6d44ee7336c7dc307722..f375ff4903e8707b2fe9c21298d34fdc6d5ab858 100644 |
--- a/compiled/bindings/generator.cpp |
+++ b/compiled/bindings/generator.cpp |
@@ -259,7 +259,7 @@ namespace bindings_internal |
auto offset = cls->subclass_differentiator.offset; |
if (offset == SIZE_MAX) |
- result += " result = exports." + cls->name + "(result);\n"; |
+ result += " result = new exports." + cls->name + "(result);\n"; |
else |
result += " result = exports." + cls->name + ".fromPointer(result);\n"; |
@@ -449,13 +449,6 @@ namespace bindings_internal |
printf(" throw new Error('Unexpected %s type: ' + type);\n", cls.name.c_str()); |
puts("};"); |
} |
- else |
- { |
- printf("exports.%s.fromPointer = function(ptr)\n", cls.name.c_str()); |
- puts("{"); |
- printf(" return new exports.%s(ptr);\n", cls.name.c_str()); |
- puts("};"); |
- } |
Wladimir Palant
2017/09/19 09:56:30
Having this method here for consistency won't real
|
for (const auto& method : cls.methods) |
{ |