You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is my code: https://github.com/webbery/civet/tree/master/caxios
The problem function is getFilesSnap in interface.cpp. I want to call it with getFilesSnap() but getFilesSnap( **anything_except_void** ) can work.
Why?
Activity
helio-frota commentedon Oct 3, 2020
hi @webbery I'm not sure if the example of function arguments may help?: https://github.com/nodejs/node-addon-examples/tree/master/2_function_arguments/node-addon-api
webbery commentedon Oct 6, 2020
@helio-frota Thanks. That's not I need. I need function like this:
But in order to work, I must call it like this:
helio-frota commentedon Oct 6, 2020
That's is weird, I'm still learning n-api btw. I have a working example here: https://github.com/helio-frota/sandwich/
That is nothing but TS calling JS that calls C++ (n-api) that calls C and not using any extra function parameter in order to work.
JS calling the N-api part here: https://github.com/helio-frota/sandwich/blob/master/jsPart.js#L5
I hope this help in some way
NickNaso commentedon Oct 6, 2020
@webbery is your code public?
helio-frota commentedon Oct 7, 2020
@webbery you can also trust on the example I shared because it was double checked and fixed by @NickNaso 😎
webbery commentedon Oct 8, 2020
Here is my code:
https://github.com/webbery/civet/tree/master/caxios
The problem function is
getFilesSnapininterface.cpp. I want to call it withgetFilesSnap()butgetFilesSnap( **anything_except_void** )can work.Why?