Hi Chad

I use a "string" wrapper to wrap "char pointer" and it works now.

You helped me a lot.

Thanks a lot again. : D

--------------------------------------------------------------
Sample code:

void test(char *s) {
     s[0]=0x64;     // change first char to lowercase 'd'
}

std::string  wrapperTest (std::string s) {
    test( *&s[0]* );
    return s;
}

EMSCRIPTEN_BINDINGS(test) {
     function("wrapperTest",&wrapperTest);
}


var s = "Data";
var t = Module.wrapperTest(s);
console.log(t);                 //  'data'




-- 
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.

Reply via email to