@ -328,13 +328,13 @@ DUK_EXTERNAL_DECL duk_bool_t duk_is_constructor_call(duk_context *ctx);
* Stack management
*/
DUK_EXTERNAL_DECL duk_idx_t duk_normalize_index ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_require_normalize_index ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_valid_index ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_require_valid_index ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_normalize_index ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_require_normalize_index ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_valid_index ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_require_valid_index ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_get_top ( duk_context * ctx ) ;
DUK_EXTERNAL_DECL void duk_set_top ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_set_top ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_get_top_index ( duk_context * ctx ) ;
DUK_EXTERNAL_DECL duk_idx_t duk_require_top_index ( duk_context * ctx ) ;
@ -354,14 +354,14 @@ DUK_EXTERNAL_DECL void duk_require_stack_top(duk_context *ctx, duk_idx_t top);
* Stack manipulation ( other than push / pop )
*/
DUK_EXTERNAL_DECL void duk_swap ( duk_context * ctx , duk_idx_t in de x1 , duk_idx_t in de x2 ) ;
DUK_EXTERNAL_DECL void duk_swap_top ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_dup ( duk_context * ctx , duk_idx_t from_in de x ) ;
DUK_EXTERNAL_DECL void duk_swap ( duk_context * ctx , duk_idx_t idx1 , duk_idx_t idx2 ) ;
DUK_EXTERNAL_DECL void duk_swap_top ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_dup ( duk_context * ctx , duk_idx_t from_idx ) ;
DUK_EXTERNAL_DECL void duk_dup_top ( duk_context * ctx ) ;
DUK_EXTERNAL_DECL void duk_insert ( duk_context * ctx , duk_idx_t to_in de x ) ;
DUK_EXTERNAL_DECL void duk_replace ( duk_context * ctx , duk_idx_t to_in de x ) ;
DUK_EXTERNAL_DECL void duk_copy ( duk_context * ctx , duk_idx_t from_in de x , duk_idx_t to_in de x ) ;
DUK_EXTERNAL_DECL void duk_remove ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_insert ( duk_context * ctx , duk_idx_t to_idx ) ;
DUK_EXTERNAL_DECL void duk_replace ( duk_context * ctx , duk_idx_t to_idx ) ;
DUK_EXTERNAL_DECL void duk_copy ( duk_context * ctx , duk_idx_t from_idx , duk_idx_t to_idx ) ;
DUK_EXTERNAL_DECL void duk_remove ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_xcopymove_raw ( duk_context * to_ctx , duk_context * from_ctx , duk_idx_t count , duk_bool_t is_copy ) ;
# define duk_xmove_top(to_ctx,from_ctx,count) \
@ -481,70 +481,70 @@ DUK_EXTERNAL_DECL void duk_pop_3(duk_context *ctx);
* is not needed ; duk_is_valid_index ( ) gives the same information .
*/
DUK_EXTERNAL_DECL duk_int_t duk_get_type ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_check_type ( duk_context * ctx , duk_idx_t in de x , duk_int_t type ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_get_type_mask ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_check_type_mask ( duk_context * ctx , duk_idx_t in de x , duk_uint_t mask ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_undefined ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_null ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_null_or_undefined ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_boolean ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_number ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_nan ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_string ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_object ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_pointer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_lightfunc ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_array ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_c_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_ecmascript_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_bound_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_thread ( duk_context * ctx , duk_idx_t in de x ) ;
# define duk_is_callable(ctx,in de x) \
duk_is_function ( ( ctx ) , ( in de x ) )
DUK_EXTERNAL_DECL duk_bool_t duk_is_dynamic_buffer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_fixed_buffer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_external_buffer ( duk_context * ctx , duk_idx_t in de x ) ;
# define duk_is_primitive(ctx,in de x) \
duk_check_type_mask ( ( ctx ) , ( in de x ) , DUK_TYPE_MASK_UNDEFINED | \
DUK_TYPE_MASK_NULL | \
DUK_TYPE_MASK_BOOLEAN | \
DUK_TYPE_MASK_NUMBER | \
DUK_TYPE_MASK_STRING | \
DUK_TYPE_MASK_BUFFER | \
DUK_TYPE_MASK_POINTER | \
DUK_TYPE_MASK_LIGHTFUNC )
# define duk_is_object_coercible(ctx,in de x) \
duk_check_type_mask ( ( ctx ) , ( in de x ) , DUK_TYPE_MASK_BOOLEAN | \
DUK_TYPE_MASK_NUMBER | \
DUK_TYPE_MASK_STRING | \
DUK_TYPE_MASK_OBJECT | \
DUK_TYPE_MASK_BUFFER | \
DUK_TYPE_MASK_POINTER | \
DUK_TYPE_MASK_LIGHTFUNC )
DUK_EXTERNAL_DECL duk_errcode_t duk_get_error_code ( duk_context * ctx , duk_idx_t in de x ) ;
# define duk_is_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) ! = 0 )
# define duk_is_eval_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_EVAL_ERROR )
# define duk_is_range_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_RANGE_ERROR )
# define duk_is_reference_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_REFERENCE_ERROR )
# define duk_is_syntax_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_SYNTAX_ERROR )
# define duk_is_type_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_TYPE_ERROR )
# define duk_is_uri_error(ctx,in de x) \
( duk_get_error_code ( ( ctx ) , ( in de x ) ) = = DUK_ERR_URI_ERROR )
DUK_EXTERNAL_DECL duk_int_t duk_get_type ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_check_type ( duk_context * ctx , duk_idx_t idx , duk_int_t type ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_get_type_mask ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_check_type_mask ( duk_context * ctx , duk_idx_t idx , duk_uint_t mask ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_undefined ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_null ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_null_or_undefined ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_boolean ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_number ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_nan ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_string ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_object ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_buffer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_pointer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_lightfunc ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_array ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_c_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_ecmascript_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_bound_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_thread ( duk_context * ctx , duk_idx_t idx ) ;
# define duk_is_callable(ctx,idx) \
duk_is_function ( ( ctx ) , ( idx ) )
DUK_EXTERNAL_DECL duk_bool_t duk_is_dynamic_buffer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_fixed_buffer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_is_external_buffer ( duk_context * ctx , duk_idx_t idx ) ;
# define duk_is_primitive(ctx,idx) \
duk_check_type_mask ( ( ctx ) , ( idx ) , DUK_TYPE_MASK_UNDEFINED | \
DUK_TYPE_MASK_NULL | \
DUK_TYPE_MASK_BOOLEAN | \
DUK_TYPE_MASK_NUMBER | \
DUK_TYPE_MASK_STRING | \
DUK_TYPE_MASK_BUFFER | \
DUK_TYPE_MASK_POINTER | \
DUK_TYPE_MASK_LIGHTFUNC )
# define duk_is_object_coercible(ctx,idx) \
duk_check_type_mask ( ( ctx ) , ( idx ) , DUK_TYPE_MASK_BOOLEAN | \
DUK_TYPE_MASK_NUMBER | \
DUK_TYPE_MASK_STRING | \
DUK_TYPE_MASK_OBJECT | \
DUK_TYPE_MASK_BUFFER | \
DUK_TYPE_MASK_POINTER | \
DUK_TYPE_MASK_LIGHTFUNC )
DUK_EXTERNAL_DECL duk_errcode_t duk_get_error_code ( duk_context * ctx , duk_idx_t idx ) ;
# define duk_is_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) ! = 0 )
# define duk_is_eval_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_EVAL_ERROR )
# define duk_is_range_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_RANGE_ERROR )
# define duk_is_reference_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_REFERENCE_ERROR )
# define duk_is_syntax_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_SYNTAX_ERROR )
# define duk_is_type_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_TYPE_ERROR )
# define duk_is_uri_error(ctx,idx) \
( duk_get_error_code ( ( ctx ) , ( idx ) ) = = DUK_ERR_URI_ERROR )
/*
* Get operations : no coercion , returns default value for invalid
@ -554,48 +554,48 @@ DUK_EXTERNAL_DECL duk_errcode_t duk_get_error_code(duk_context *ctx, duk_idx_t i
* are not included .
*/
DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_double_t duk_get_number ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_int_t duk_get_int ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_get_uint ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_get_string ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_get_lstring ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_get_buffer ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_get_buffer_data ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_get_pointer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_c_function duk_get_c_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_context * duk_get_context ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void * duk_get_heapptr ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_size_t duk_get_length ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_boolean ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_double_t duk_get_number ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_int_t duk_get_int ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_get_uint ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_get_string ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_get_lstring ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_get_buffer ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_get_buffer_data ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_get_pointer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_c_function duk_get_c_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_context * duk_get_context ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void * duk_get_heapptr ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_size_t duk_get_length ( duk_context * ctx , duk_idx_t idx ) ;
/*
* Require operations : no coercion , throw error if index or type
* is incorrect . No defaulting .
*/
# define duk_require_type_mask(ctx,in de x,mask) \
( ( void ) duk_check_type_mask ( ( ctx ) , ( in de x ) , ( mask ) | DUK_TYPE_MASK_THROW ) )
DUK_EXTERNAL_DECL void duk_require_undefined ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_require_null ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_require_boolean ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_double_t duk_require_number ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_int_t duk_require_int ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_require_uint ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_require_string ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_require_lstring ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_require_buffer ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_require_buffer_data ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_require_pointer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_c_function duk_require_c_function ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_context * duk_require_context ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_require_function ( duk_context * ctx , duk_idx_t in de x ) ;
# define duk_require_callable(ctx,in de x) \
duk_require_function ( ( ctx ) , ( in de x ) )
DUK_EXTERNAL_DECL void * duk_require_heapptr ( duk_context * ctx , duk_idx_t in de x ) ;
# define duk_require_object_coercible(ctx,in de x) \
( ( void ) duk_check_type_mask ( ( ctx ) , ( in de x ) , DUK_TYPE_MASK_BOOLEAN | \
# define duk_require_type_mask(ctx,idx,mask) \
( ( void ) duk_check_type_mask ( ( ctx ) , ( idx ) , ( mask ) | DUK_TYPE_MASK_THROW ) )
DUK_EXTERNAL_DECL void duk_require_undefined ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_require_null ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_require_boolean ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_double_t duk_require_number ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_int_t duk_require_int ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_require_uint ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_require_string ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_require_lstring ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_require_buffer ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_require_buffer_data ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void * duk_require_pointer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_c_function duk_require_c_function ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_context * duk_require_context ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_require_function ( duk_context * ctx , duk_idx_t idx ) ;
# define duk_require_callable(ctx,idx) \
duk_require_function ( ( ctx ) , ( idx ) )
DUK_EXTERNAL_DECL void * duk_require_heapptr ( duk_context * ctx , duk_idx_t idx ) ;
# define duk_require_object_coercible(ctx,idx) \
( ( void ) duk_check_type_mask ( ( ctx ) , ( idx ) , DUK_TYPE_MASK_BOOLEAN | \
DUK_TYPE_MASK_NUMBER | \
DUK_TYPE_MASK_STRING | \
DUK_TYPE_MASK_OBJECT | \
@ -611,57 +611,57 @@ DUK_EXTERNAL_DECL void *duk_require_heapptr(duk_context *ctx, duk_idx_t index);
* or an internal error ( e . g . from out of memory ) .
*/
DUK_EXTERNAL_DECL void duk_to_undefined ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_to_null ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_to_boolean ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_double_t duk_to_number ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_int_t duk_to_int ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_to_uint ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_int32_t duk_to_int32 ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_uint32_t duk_to_uint32 ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_uint16_t duk_to_uint16 ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_to_string ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_to_lstring ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_to_buffer_raw ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size , duk_uint_t flags ) ;
DUK_EXTERNAL_DECL void * duk_to_pointer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_to_object ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_to_defaultvalue ( duk_context * ctx , duk_idx_t in de x , duk_int_t hint ) ;
DUK_EXTERNAL_DECL void duk_to_primitive ( duk_context * ctx , duk_idx_t in de x , duk_int_t hint ) ;
DUK_EXTERNAL_DECL void duk_to_undefined ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_to_null ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_to_boolean ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_double_t duk_to_number ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_int_t duk_to_int ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_uint_t duk_to_uint ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_int32_t duk_to_int32 ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_uint32_t duk_to_uint32 ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_uint16_t duk_to_uint16 ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_to_string ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_to_lstring ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_len ) ;
DUK_EXTERNAL_DECL void * duk_to_buffer_raw ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size , duk_uint_t flags ) ;
DUK_EXTERNAL_DECL void * duk_to_pointer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_to_object ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_to_defaultvalue ( duk_context * ctx , duk_idx_t idx , duk_int_t hint ) ;
DUK_EXTERNAL_DECL void duk_to_primitive ( duk_context * ctx , duk_idx_t idx , duk_int_t hint ) ;
# define DUK_BUF_MODE_FIXED 0 /* internal: request fixed buffer result */
# define DUK_BUF_MODE_DYNAMIC 1 /* internal: request dynamic buffer result */
# define DUK_BUF_MODE_DONTCARE 2 /* internal: don't care about fixed/dynamic nature */
# define duk_to_buffer(ctx,in de x,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( in de x ) , ( out_size ) , DUK_BUF_MODE_DONTCARE )
# define duk_to_fixed_buffer(ctx,in de x,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( in de x ) , ( out_size ) , DUK_BUF_MODE_FIXED )
# define duk_to_dynamic_buffer(ctx,in de x,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( in de x ) , ( out_size ) , DUK_BUF_MODE_DYNAMIC )
# define duk_to_buffer(ctx,idx,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( idx ) , ( out_size ) , DUK_BUF_MODE_DONTCARE )
# define duk_to_fixed_buffer(ctx,idx,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( idx ) , ( out_size ) , DUK_BUF_MODE_FIXED )
# define duk_to_dynamic_buffer(ctx,idx,out_size) \
duk_to_buffer_raw ( ( ctx ) , ( idx ) , ( out_size ) , DUK_BUF_MODE_DYNAMIC )
/* safe variants of a few coercion operations */
DUK_EXTERNAL_DECL const char * duk_safe_to_lstring ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_len ) ;
# define duk_safe_to_string(ctx,in de x) \
duk_safe_to_lstring ( ( ctx ) , ( in de x ) , NULL )
DUK_EXTERNAL_DECL const char * duk_safe_to_lstring ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_len ) ;
# define duk_safe_to_string(ctx,idx) \
duk_safe_to_lstring ( ( ctx ) , ( idx ) , NULL )
/*
* Misc conversion
*/
DUK_EXTERNAL_DECL const char * duk_base64_encode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_base64_decode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_hex_encode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_hex_decode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_json_encode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_json_decode ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL const char * duk_base64_encode ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_base64_decode ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_hex_encode ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_hex_decode ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL const char * duk_json_encode ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_json_decode ( duk_context * ctx , duk_idx_t idx ) ;
/*
* Buffer
*/
DUK_EXTERNAL_DECL void * duk_resize_buffer ( duk_context * ctx , duk_idx_t in de x , duk_size_t new_size ) ;
DUK_EXTERNAL_DECL void * duk_steal_buffer ( duk_context * ctx , duk_idx_t in de x , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void duk_config_buffer ( duk_context * ctx , duk_idx_t in de x , void * ptr , duk_size_t len ) ;
DUK_EXTERNAL_DECL void * duk_resize_buffer ( duk_context * ctx , duk_idx_t idx , duk_size_t new_size ) ;
DUK_EXTERNAL_DECL void * duk_steal_buffer ( duk_context * ctx , duk_idx_t idx , duk_size_t * out_size ) ;
DUK_EXTERNAL_DECL void duk_config_buffer ( duk_context * ctx , duk_idx_t idx , void * ptr , duk_size_t len ) ;
/*
* Property access
@ -671,19 +671,19 @@ DUK_EXTERNAL_DECL void duk_config_buffer(duk_context *ctx, duk_idx_t index, void
* index as a property name ( e . g . 123 is equivalent to the key " 123 " ) .
*/
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop ( duk_context * ctx , duk_idx_t obj_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_string ( duk_context * ctx , duk_idx_t obj_in de x , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_index ( duk_context * ctx , duk_idx_t obj_in de x , duk_uarridx_t arr_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop ( duk_context * ctx , duk_idx_t obj_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_string ( duk_context * ctx , duk_idx_t obj_in de x , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_index ( duk_context * ctx , duk_idx_t obj_in de x , duk_uarridx_t arr_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop ( duk_context * ctx , duk_idx_t obj_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_string ( duk_context * ctx , duk_idx_t obj_in de x , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_index ( duk_context * ctx , duk_idx_t obj_in de x , duk_uarridx_t arr_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop ( duk_context * ctx , duk_idx_t obj_in de x ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_string ( duk_context * ctx , duk_idx_t obj_in de x , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_index ( duk_context * ctx , duk_idx_t obj_in de x , duk_uarridx_t arr_in de x ) ;
DUK_EXTERNAL_DECL void duk_def_prop ( duk_context * ctx , duk_idx_t obj_in de x , duk_uint_t flags ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop ( duk_context * ctx , duk_idx_t obj_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_string ( duk_context * ctx , duk_idx_t obj_idx , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_prop_index ( duk_context * ctx , duk_idx_t obj_idx , duk_uarridx_t arr_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop ( duk_context * ctx , duk_idx_t obj_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_string ( duk_context * ctx , duk_idx_t obj_idx , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_prop_index ( duk_context * ctx , duk_idx_t obj_idx , duk_uarridx_t arr_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop ( duk_context * ctx , duk_idx_t obj_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_string ( duk_context * ctx , duk_idx_t obj_idx , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_del_prop_index ( duk_context * ctx , duk_idx_t obj_idx , duk_uarridx_t arr_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop ( duk_context * ctx , duk_idx_t obj_idx ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_string ( duk_context * ctx , duk_idx_t obj_idx , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_has_prop_index ( duk_context * ctx , duk_idx_t obj_idx , duk_uarridx_t arr_idx ) ;
DUK_EXTERNAL_DECL void duk_def_prop ( duk_context * ctx , duk_idx_t obj_idx , duk_uint_t flags ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_get_global_string ( duk_context * ctx , const char * key ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_put_global_string ( duk_context * ctx , const char * key ) ;
@ -692,15 +692,15 @@ DUK_EXTERNAL_DECL duk_bool_t duk_put_global_string(duk_context *ctx, const char
* Object prototype
*/
DUK_EXTERNAL_DECL void duk_get_prototype ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_set_prototype ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_get_prototype ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_set_prototype ( duk_context * ctx , duk_idx_t idx ) ;
/*
* Object finalizer
*/
DUK_EXTERNAL_DECL void duk_get_finalizer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_set_finalizer ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_get_finalizer ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_set_finalizer ( duk_context * ctx , duk_idx_t idx ) ;
/*
* Global object
@ -712,24 +712,24 @@ DUK_EXTERNAL_DECL void duk_set_global_object(duk_context *ctx);
* Duktape / C function magic value
*/
DUK_EXTERNAL_DECL duk_int_t duk_get_magic ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL void duk_set_magic ( duk_context * ctx , duk_idx_t in de x , duk_int_t magic ) ;
DUK_EXTERNAL_DECL duk_int_t duk_get_magic ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL void duk_set_magic ( duk_context * ctx , duk_idx_t idx , duk_int_t magic ) ;
DUK_EXTERNAL_DECL duk_int_t duk_get_current_magic ( duk_context * ctx ) ;
/*
* Module helpers : put multiple function or constant properties
*/
DUK_EXTERNAL_DECL void duk_put_function_list ( duk_context * ctx , duk_idx_t obj_in de x , const duk_function_list_entry * funcs ) ;
DUK_EXTERNAL_DECL void duk_put_number_list ( duk_context * ctx , duk_idx_t obj_in de x , const duk_number_list_entry * numbers ) ;
DUK_EXTERNAL_DECL void duk_put_function_list ( duk_context * ctx , duk_idx_t obj_idx , const duk_function_list_entry * funcs ) ;
DUK_EXTERNAL_DECL void duk_put_number_list ( duk_context * ctx , duk_idx_t obj_idx , const duk_number_list_entry * numbers ) ;
/*
* Object operations
*/
DUK_EXTERNAL_DECL void duk_compact ( duk_context * ctx , duk_idx_t obj_in de x ) ;
DUK_EXTERNAL_DECL void duk_enum ( duk_context * ctx , duk_idx_t obj_in de x , duk_uint_t enum_flags ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_next ( duk_context * ctx , duk_idx_t enum_in de x , duk_bool_t get_value ) ;
DUK_EXTERNAL_DECL void duk_compact ( duk_context * ctx , duk_idx_t obj_idx ) ;
DUK_EXTERNAL_DECL void duk_enum ( duk_context * ctx , duk_idx_t obj_idx , duk_uint_t enum_flags ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_next ( duk_context * ctx , duk_idx_t enum_idx , duk_bool_t get_value ) ;
/*
* String manipulation
@ -737,19 +737,19 @@ DUK_EXTERNAL_DECL duk_bool_t duk_next(duk_context *ctx, duk_idx_t enum_index, du
DUK_EXTERNAL_DECL void duk_concat ( duk_context * ctx , duk_idx_t count ) ;
DUK_EXTERNAL_DECL void duk_join ( duk_context * ctx , duk_idx_t count ) ;
DUK_EXTERNAL_DECL void duk_decode_string ( duk_context * ctx , duk_idx_t in de x , duk_decode_char_function callback , void * udata ) ;
DUK_EXTERNAL_DECL void duk_map_string ( duk_context * ctx , duk_idx_t in de x , duk_map_char_function callback , void * udata ) ;
DUK_EXTERNAL_DECL void duk_substring ( duk_context * ctx , duk_idx_t in de x , duk_size_t start_char_offset , duk_size_t end_char_offset ) ;
DUK_EXTERNAL_DECL void duk_trim ( duk_context * ctx , duk_idx_t in de x ) ;
DUK_EXTERNAL_DECL duk_codepoint_t duk_char_code_at ( duk_context * ctx , duk_idx_t in de x , duk_size_t char_offset ) ;
DUK_EXTERNAL_DECL void duk_decode_string ( duk_context * ctx , duk_idx_t idx , duk_decode_char_function callback , void * udata ) ;
DUK_EXTERNAL_DECL void duk_map_string ( duk_context * ctx , duk_idx_t idx , duk_map_char_function callback , void * udata ) ;
DUK_EXTERNAL_DECL void duk_substring ( duk_context * ctx , duk_idx_t idx , duk_size_t start_char_offset , duk_size_t end_char_offset ) ;
DUK_EXTERNAL_DECL void duk_trim ( duk_context * ctx , duk_idx_t idx ) ;
DUK_EXTERNAL_DECL duk_codepoint_t duk_char_code_at ( duk_context * ctx , duk_idx_t idx , duk_size_t char_offset ) ;
/*
* Ecmascript operators
*/
DUK_EXTERNAL_DECL duk_bool_t duk_equals ( duk_context * ctx , duk_idx_t in de x1 , duk_idx_t in de x2 ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_strict_equals ( duk_context * ctx , duk_idx_t in de x1 , duk_idx_t in de x2 ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_instanceof ( duk_context * ctx , duk_idx_t in de x1 , duk_idx_t in de x2 ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_equals ( duk_context * ctx , duk_idx_t idx1 , duk_idx_t idx2 ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_strict_equals ( duk_context * ctx , duk_idx_t idx1 , duk_idx_t idx2 ) ;
DUK_EXTERNAL_DECL duk_bool_t duk_instanceof ( duk_context * ctx , duk_idx_t idx1 , duk_idx_t idx2 ) ;
/*
* Function ( method ) calls
@ -757,10 +757,10 @@ DUK_EXTERNAL_DECL duk_bool_t duk_instanceof(duk_context *ctx, duk_idx_t index1,
DUK_EXTERNAL_DECL void duk_call ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL void duk_call_method ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL void duk_call_prop ( duk_context * ctx , duk_idx_t obj_in de x , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL void duk_call_prop ( duk_context * ctx , duk_idx_t obj_idx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_pcall ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_pcall_method ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_pcall_prop ( duk_context * ctx , duk_idx_t obj_in de x , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_pcall_prop ( duk_context * ctx , duk_idx_t obj_idx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL void duk_new ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_pnew ( duk_context * ctx , duk_idx_t nargs ) ;
DUK_EXTERNAL_DECL duk_int_t duk_safe_call ( duk_context * ctx , duk_safe_call_function func , void * udata , duk_idx_t nargs , duk_idx_t nrets ) ;
@ -885,7 +885,7 @@ DUK_EXTERNAL_DECL void duk_debugger_pause(duk_context *ctx);
*/
DUK_EXTERNAL_DECL duk_double_t duk_get_now ( duk_context * ctx ) ;
DUK_EXTERNAL_DECL void duk_time_to_components ( duk_context * ctx , duk_double_t time , duk_time_components * comp ) ;
DUK_EXTERNAL_DECL void duk_time_to_components ( duk_context * ctx , duk_double_t timeval , duk_time_components * comp ) ;
DUK_EXTERNAL_DECL duk_double_t duk_components_to_time ( duk_context * ctx , duk_time_components * comp ) ;
/*