First, is the Function callback calling a C++ native function, a JS
function or another C++ defined Function callback? Providing some
code might make the issue more obvious.
Second, v8.h has all the JS ("container") types defined. Start there
when defining variables. You can often use the v8 type when going
between JS-land and C++-land. Things like:
```
v8::Array arr = Array::New( isolate, len );
v8::Integer i = Integer::New( isolate, ivalue );
```
If you're converting the callback's parameters to a native type:
```
String::Utf8Value str( args[ 0 ] );
char* ascii = *str; // * is overloaded to return an ASCII C string
int n = ( int )( args[ 1 ]->Int32Value() );
```
Once you have the parameter in the v8 type or C++ type, you can pass
them appropriately.
If you're hard up for the wrapper approach, then Stephen Beal had an
extensive template based solution that is probably 18-24 months
out-of-date (read: extensively out of date) and then there's node.js'
wrapper object approach.
-L
> --
> --
> v8-users mailing list
>
v8-u...@googlegroups.com
>
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
v8-users+u...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.