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
FEAT: native's specification may be defined directly in C code using special header structure
This is based on Hostile Fork's work on Ren-c, just without using his INCLUDE_PARAMS_OF_* macros.
It is still possible to use the old way definitions, so the original code does not have to be completely modified.
For example:
/**********************************************************************/
//
// test-native: native [
// {This is just a native function for test purpose.}
// 'value [any-type!] "This can be value of any type"
// ]
//
REBNATIVE(test_native)
{
REBVAL *val = D_ARG(1);
printf("Value has type ID: %i\n", VAL_TYPE(val));
return R_ARG1; //return the same value
}
0 commit comments