Reduct  v1.0.4-3-gdaf0d70
A functional and immutable language.
Loading...
Searching...
No Matches
Native Functions

Detailed Description

A "native" is a C function that can be called at runtime.

Data Structures

struct  reduct_native_t
 Native function definition structure. More...
 

Typedefs

typedef reduct_handle_t(* reduct_native_fn) (struct reduct *reduct, reduct_size_t argc, reduct_handle_t *argv)
 Native function pointer type.
 

Functions

REDUCT_API void reduct_native_register (struct reduct *reduct, reduct_native_t *array, reduct_size_t count)
 Register native functions.
 

Typedef Documentation

◆ reduct_native_fn

typedef reduct_handle_t(* reduct_native_fn) (struct reduct *reduct, reduct_size_t argc, reduct_handle_t *argv)

Native function pointer type.

Parameters
reductThe Reduct structure.
argcThe number of arguments.
argvThe array of arguments.
Returns
The result of the function.

Definition at line 26 of file native.h.

Function Documentation

◆ reduct_native_register()

REDUCT_API void reduct_native_register ( struct reduct *  reduct,
reduct_native_t array,
reduct_size_t  count 
)

Register native functions.

Parameters
reductThe Reduct structure.
arrayAn array of native function definitions.
countThe number of functions in the array.
Here is the caller graph for this function: