Hey,

yes this was the right direction:

char * string = (* String::AsciiValue(args[0]->ToString));

Am 06.06.2013 um 17:24 schrieb Stephan Beal <[email protected]>:

> On Thu, Jun 6, 2013 at 5:20 PM, Bodo Kaiser <[email protected]> wrote:
> I am trying to get a "const char *" string out of a v8 String Object.
> 
> Unfortunately all access result in a segmentation fault:
> 
> Try: (i'm working from memory, but i _think_ this is right:
> 
> v8::Utf8Value str( *yourStringHandle );
> puts( *str );
> 
>             ->GetExternalAsciiStringResource()->length());
> 
> 
> "external" strings are a special case of strings which are allocated 
> "elsewhere" (outside of v8), or at least that's my understanding.
> 
> -- 
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> 
> -- 
> -- 
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "v8-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/v8-users/Bm1JXY9NY2c/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

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