|
@ -32,6 +32,7 @@ extern "C" { |
|
|
* in Duktape web documentation. |
|
|
* in Duktape web documentation. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
struct duk_thread_state; |
|
|
struct duk_memory_functions; |
|
|
struct duk_memory_functions; |
|
|
struct duk_function_list_entry; |
|
|
struct duk_function_list_entry; |
|
|
struct duk_number_list_entry; |
|
|
struct duk_number_list_entry; |
|
@ -40,6 +41,7 @@ struct duk_time_components; |
|
|
/* duk_context is now defined in duk_config.h because it may also be
|
|
|
/* duk_context is now defined in duk_config.h because it may also be
|
|
|
* referenced there by prototypes. |
|
|
* referenced there by prototypes. |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
typedef struct duk_thread_state duk_thread_state; |
|
|
typedef struct duk_memory_functions duk_memory_functions; |
|
|
typedef struct duk_memory_functions duk_memory_functions; |
|
|
typedef struct duk_function_list_entry duk_function_list_entry; |
|
|
typedef struct duk_function_list_entry duk_function_list_entry; |
|
|
typedef struct duk_number_list_entry duk_number_list_entry; |
|
|
typedef struct duk_number_list_entry duk_number_list_entry; |
|
@ -61,6 +63,10 @@ typedef void (*duk_debug_write_flush_function) (void *udata); |
|
|
typedef duk_idx_t (*duk_debug_request_function) (duk_context *ctx, void *udata, duk_idx_t nvalues); |
|
|
typedef duk_idx_t (*duk_debug_request_function) (duk_context *ctx, void *udata, duk_idx_t nvalues); |
|
|
typedef void (*duk_debug_detached_function) (duk_context *ctx, void *udata); |
|
|
typedef void (*duk_debug_detached_function) (duk_context *ctx, void *udata); |
|
|
|
|
|
|
|
|
|
|
|
struct duk_thread_state { |
|
|
|
|
|
char data[128]; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
struct duk_memory_functions { |
|
|
struct duk_memory_functions { |
|
|
duk_alloc_function alloc_func; |
|
|
duk_alloc_function alloc_func; |
|
|
duk_realloc_function realloc_func; |
|
|
duk_realloc_function realloc_func; |
|
@ -256,6 +262,9 @@ duk_context *duk_create_heap(duk_alloc_function alloc_func, |
|
|
duk_fatal_function fatal_handler); |
|
|
duk_fatal_function fatal_handler); |
|
|
DUK_EXTERNAL_DECL void duk_destroy_heap(duk_context *ctx); |
|
|
DUK_EXTERNAL_DECL void duk_destroy_heap(duk_context *ctx); |
|
|
|
|
|
|
|
|
|
|
|
DUK_EXTERNAL_DECL void duk_suspend(duk_context *ctx, duk_thread_state *state); |
|
|
|
|
|
DUK_EXTERNAL_DECL void duk_resume(duk_context *ctx, const duk_thread_state *state); |
|
|
|
|
|
|
|
|
#define duk_create_heap_default() \ |
|
|
#define duk_create_heap_default() \ |
|
|
duk_create_heap(NULL, NULL, NULL, NULL, NULL) |
|
|
duk_create_heap(NULL, NULL, NULL, NULL, NULL) |
|
|
|
|
|
|
|
|