Prev | Current Page 1049 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

The helper functions provided greatly reduce the
pain of managing data and exposure of this data between the C/C++ and the Neko layers. However,
there are limitations to these helper functions.
One of the primary issues with what you have learned so far revolves around the number of parameters
you can safely assign to the signature of a C/C++ function destined to be exposed to the Neko layer.
The problem is, for every possibility of function signature, there is a corresponding helper capability.
Therefore, code has been written for functions accepting one parameter, those accepting two parameters,
those accepting three, and so on. This goes on to functions accepting up to five parameters. From there, if
you wish to expose a function in your library utilizing more than the maximum five parameters, you ??™ ll
need to handle the parameter data differently.
For example, normally, for a function accepting a few parameters, you may detail its signature as:
value someFunc( value one, value two, value three )
Once written, you will then expose this function using the DEFINE_PRIM function, like this:
DEFINE_PRIM( someFunc, 3 );
Great.


Pages:
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061