Hi,
You ought to be able to simply write an object literal:
{ 'foo': 10, 'bar': 'abcd' }
and pass it straight into a C++ function expecting a value of that type.
On Fri, Nov 21, 2014 at 2:47 AM, <[email protected]> wrote:
> Hi all,
>
> I have struct in C code.
> I have map this struct with emscripten::value_object and I want to create
> the struct in javascript side.
>
> I try with "new Module.MyStructName" but it doesn't work.
> If i use class_ to map the strcut, I have no constructor error.
>
> How can i do that ?
>
> --
> 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.
>
--
Chad Austin
Technical Director, IMVU
http://engineering.imvu.com <http://www.imvu.com/members/Chad/>
http://chadaustin.me
--
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.