node-addon-layer
C API For writing Node modules
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
External methods

Functions

shim_val_tshim_external_new (shim_ctx_t *ctx, void *data)
 
void * shim_external_value (shim_ctx_t *ctx, shim_val_t *val)
 

Detailed Description

Methods for externals

Function Documentation

shim_val_t* shim_external_new ( shim_ctx_t ctx,
void *  data 
)

Create a new external

Parameters
ctxCurrently executing context
dataThe external data to wrap
Returns
Wrapped external

This is an object that is safe to pass to and from JavaScript.

See Also
Persistent methods
void* shim_external_value ( shim_ctx_t ctx,
shim_val_t obj 
)

Get the underlying memory for the external

Parameters
ctxCurrently executing context
objThe given external
Returns
The pointer to the wrapped memory