node-addon-layer
C API For writing Node modules
|
Data Structures | |
struct | shim_module_struct |
Used by node to identify how to initialize this module. More... | |
struct | shim_fspec_s |
Macros | |
#define | SHIM_ABI_VERSION 1 |
#define | SHIM_MODULE(name, func) |
#define | SHIM_FS_FULL(name, cfunc, nargs, data, flags) { name, &cfunc, nargs, data, flags, 0 } |
#define | SHIM_FS_DEF(cfunc, nargs, data) SHIM_FS_FULL(#cfunc, cfunc, nargs, data, 0) |
#define | SHIM_FS(cfunc) SHIM_FS_DEF(cfunc, 0, NULL) |
#define | SHIM_FS_END { NULL, NULL, 0, NULL, 0, 0 } |
Typedefs | |
typedef enum shim_type | shim_type_t |
typedef struct shim_val_s | shim_val_t |
typedef struct shim_ctx_s | shim_ctx_t |
typedef struct shim_args_s | shim_args_t |
typedef int | shim_bool_t |
typedef void(* | node_register_func )(void *, void *) |
typedef int(* | register_func )(shim_ctx_t *, shim_val_t *, shim_val_t *) |
typedef int(* | shim_func )(shim_ctx_t *, shim_args_t *) |
typedef struct shim_fspec_s | shim_fspec_t |
Functions | |
void | shim_module_initialize (void *, void *) |
Variables | |
register_func | shim_initialize |
#define SHIM_ABI_VERSION 1 |
The ABI version of the addon layer
#define SHIM_FS | ( | cfunc) | SHIM_FS_DEF(cfunc, 0, NULL) |
Define just the function
#define SHIM_FS_DEF | ( | cfunc, | |
nargs, | |||
data | |||
) | SHIM_FS_FULL(#cfunc, cfunc, nargs, data, 0) |
Define only the function, args, and data
#define SHIM_FS_END { NULL, NULL, 0, NULL, 0, 0 } |
Sentinel that indicates we're done defining functions
#define SHIM_FS_FULL | ( | name, | |
cfunc, | |||
nargs, | |||
data, | |||
flags | |||
) | { name, &cfunc, nargs, data, flags, 0 } |
Define the all the properties fo the function
#define SHIM_MODULE | ( | name, | |
func | |||
) |
Use this to define the name and func entry point of your module
typedef void(* node_register_func)(void *, void *) |
Entry point from node to register the addon layer
typedef int(* register_func)(shim_ctx_t *, shim_val_t *, shim_val_t *) |
Signature of for how a module will be initialized
typedef struct shim_args_s shim_args_t |
The opaque handle that represents the arguments passed to this function
typedef int shim_bool_t |
A wrapper for TRUE and FALSE that is merely an int
typedef struct shim_ctx_s shim_ctx_t |
The opaque handle that represents the currently executing context
typedef struct shim_fspec_s shim_fspec_t |
Describes a function signature
typedef int(* shim_func)(shim_ctx_t *, shim_args_t *) |
The signature of the entry point for exported functions
typedef enum shim_type shim_type_t |
Defines the types natively supported by the addon layer
typedef struct shim_val_s shim_val_t |
The opaque handle that represents a javascript value
You should use shim_value_release
enum shim_type |
Defines the types natively supported by the addon layer
void shim_module_initialize | ( | void * | , |
void * | |||
) |
The declaration of the addon layer entry point
register_func shim_initialize |
Location of your entry point