Hi all,
For *class_* it works as expected when a nullptr is returned like:
MyClass* getMyClass() {
return nullptr; // JS value: null
}
But for *value_array* I get back an JS array, even if a nullptr was
returned:
Point2f* getPoint2f() {
return nullptr; // JS value: [3.5733110840282835e-43, 0]
}
//...
EMSCRIPTEN_BINDINGS(Foo) {
value_array<Point2f>("Point2f")
.element(&Point2f::x)
.element(&Point2f::y);
}
It seems that *value_array* binding doesn't check against nulltptr
beforehand, when translating it into a JS Array.
Is it a bug or a feature? Is there anything else I can do instead of
wrapping the Point2f value to cover the nullptr case?
salute
Thomas
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.