Hello,

I am trying to get a "const char *" string out of a v8 String Object.

Unfortunately all access result in a segmentation fault:

    /*
    const char * string;
   
    string = (const char *) malloc(args[0]->ToString()
            ->GetExternalAsciiStringResource()->length());

    string = args[0]->ToString()
        ->GetExternalAsciiStringResource()->data();*/

    printf("%s\n", 
args[0]->ToString()->GetExternalAsciiStringResource()->data());

Can somebody tell me how to access the string properly?

Bodo

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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/groups/opt_out.


Reply via email to