Closed kimtn-bitmark closed 9 years ago
Your stringPtr
is really a char **
. Ditch the refType() call, and just pass in ref.types.CString directly.
I was use ref.types.CString
, but the result does not like my expect. It's look like we are passing a String not a pointer of String. Purpose of my function are convert the first character to "z" but i don't want to use return value for that function(because it's should be fine when i want to pass multi input)
Example: Input: abc --> Output: zbc
I' trying to passing a pointer variable to C function from node with ffi, ref
In C file:
In js file:
I run this command:
And the result look like:
In my expected the result should be:
I'm using: ffi: 1.3.2 ref: 1.0.2 node: 0.10