node-addon-layer
C API For writing Node modules
|
Functions | |
shim_val_t * | shim_func_new (shim_ctx_t *ctx, shim_func cfunc, size_t argc, int32_t flags, const char *name, void *data) |
shim_bool_t | shim_func_call_sym (shim_ctx_t *ctx, shim_val_t *self, shim_val_t *name, size_t argc, shim_val_t **argv, shim_val_t *rval) |
shim_bool_t | shim_func_call_name (shim_ctx_t *ctx, shim_val_t *self, const char *name, size_t argc, shim_val_t **argv, shim_val_t *rval) |
shim_bool_t | shim_func_call_val (shim_ctx_t *ctx, shim_val_t *self, shim_val_t *func, size_t argc, shim_val_t **argv, shim_val_t *rval) |
shim_bool_t | shim_make_callback_sym (shim_ctx_t *ctx, shim_val_t *self, shim_val_t *sym, size_t argc, shim_val_t **argv, shim_val_t *rval) |
shim_bool_t | shim_make_callback_val (shim_ctx_t *ctx, shim_val_t *self, shim_val_t *fval, size_t argc, shim_val_t **argv, shim_val_t *rval) |
shim_bool_t | shim_make_callback_name (shim_ctx_t *ctx, shim_val_t *obj, const char *name, size_t argc, shim_val_t **argv, shim_val_t *rval) |
Methods for functions
shim_bool_t shim_func_call_name | ( | shim_ctx_t * | ctx, |
shim_val_t * | self, | ||
const char * | name, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Get the function by name from an object and call it
ctx | Currently executing context |
self | The this parameter of the function call |
name | The name of the function |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |
shim_bool_t shim_func_call_sym | ( | shim_ctx_t * | ctx, |
shim_val_t * | self, | ||
shim_val_t * | sym, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Get the symbol from the object as a function and call it
ctx | Currently executing context |
self | The this parameter of the function call |
sym | The symbol representing the name of the function |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |
shim_bool_t shim_func_call_val | ( | shim_ctx_t * | ctx, |
shim_val_t * | self, | ||
shim_val_t * | func, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Call the given function
ctx | Currently executing context |
self | The this parameter of the function call |
func | The function to be called |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |
shim_val_t* shim_func_new | ( | shim_ctx_t * | ctx, |
shim_func | cfunc, | ||
size_t | argc, | ||
int32_t | flags, | ||
const char * | name, | ||
void * | hint | ||
) |
Create a new javascript function that points to a C function
ctx | Currently executing context |
cfunc | The function pointer to be executed |
argc | The number of arguments the function takes |
flags | The flags for the function |
name | The name of the function |
hint | Arbitrary data to keep associated with the function |
shim_bool_t shim_make_callback_name | ( | shim_ctx_t * | ctx, |
shim_val_t * | obj, | ||
const char * | name, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Process the callback for the given name
ctx | Currently executing context |
obj | The this parameter of the function call |
name | The name of the function |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |
shim_bool_t shim_make_callback_sym | ( | shim_ctx_t * | ctx, |
shim_val_t * | self, | ||
shim_val_t * | sym, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Get a function by symbol and process the callback
ctx | Currently executing context |
self | The this parameter of the function call |
sym | The symbol representing the name of the function |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |
shim_bool_t shim_make_callback_val | ( | shim_ctx_t * | ctx, |
shim_val_t * | self, | ||
shim_val_t * | fval, | ||
size_t | argc, | ||
shim_val_t ** | argv, | ||
shim_val_t * | rval | ||
) |
Process the callback for the given function
ctx | Currently executing context |
self | The this parameter of the function call |
fval | The function to call |
argc | The number of args to pass the function |
argv | The array of arguments to pass to the function |
rval | The return value of the function |