cudyn/proto.h: Dynamic Prototypes and FFI Calls
[cudyn: Dynamic Typing]

Data Structures

struct  cudyn_proto

Defines

#define CUDYN_PROTO_KEY_SIZE   (offsetof(struct cudyn_proto, cif) - CUOO_HCOBJ_SHIFT)

Functions

cuoo_type_t cudyn_proto_type ()
cuoo_type_t cudyn_proto_to_type (cudyn_proto_t proto)
cudyn_proto_t cudyn_proto_from_type (cuoo_type_t t)
cu_bool_t cudyn_is_fn (cuex_t ex)
cudyn_proto_t cudyn_proto_by_tuptype (cudyn_tuptype_t arg_type, cuoo_type_t res_type)
cudyn_proto_t cudyn_proto (cu_rank_t r,...)
cudyn_proto_t cudyn_proto_0 (cuoo_type_t tR)
cudyn_proto_t cudyn_proto_1 (cuoo_type_t t0, cuoo_type_t tR)
cudyn_proto_t cudyn_proto_2 (cuoo_type_t t0, cuoo_type_t t1, cuoo_type_t tR)
cudyn_proto_t cudyn_proto_3 (cuoo_type_t t0, cuoo_type_t t1, cuoo_type_t t2, cuoo_type_t tR)
cudyn_proto_t cudyn_proto_4 (cuoo_type_t t0, cuoo_type_t t1, cuoo_type_t t2, cuoo_type_t t3, cuoo_type_t tR)
size_t cudyn_proto_r (cudyn_proto_t proto)
cuex_t cudyn_proto_apply_fn (cudyn_proto_t proto, cu_fnptr_t fn, cuex_t *arg_arr)
cuoo_type_t cudyn_proto_arg_type_at (cudyn_proto_t proto, cu_rank_t i)
cuoo_type_t cudyn_proto_res_type (cudyn_proto_t proto)

Variables

cuoo_type_t cudynP_proto_type

Function Documentation

cu_bool_t cudyn_is_fn ( cuex_t  ex  ) 

True if ex points to a prototype.

cudyn_proto_t cudyn_proto ( cu_rank_t  r,
  ... 
)

Constructor of prototypes of any arity. The varargs are the cuoo_type_t for the argument types, followed by that of the result type.

cudyn_proto_t cudyn_proto_0 ( cuoo_type_t  tR  ) 

Type-safe variant of cudyn_proto.

cudyn_proto_t cudyn_proto_1 ( cuoo_type_t  t0,
cuoo_type_t  tR 
)

Type-safe variant of cudyn_proto.

cudyn_proto_t cudyn_proto_2 ( cuoo_type_t  t0,
cuoo_type_t  t1,
cuoo_type_t  tR 
)

Type-safe variant of cudyn_proto.

cudyn_proto_t cudyn_proto_3 ( cuoo_type_t  t0,
cuoo_type_t  t1,
cuoo_type_t  t2,
cuoo_type_t  tR 
)

Type-safe variant of cudyn_proto.

cudyn_proto_t cudyn_proto_4 ( cuoo_type_t  t0,
cuoo_type_t  t1,
cuoo_type_t  t2,
cuoo_type_t  t3,
cuoo_type_t  tR 
)

Type-safe variant of cudyn_proto.

cuex_t cudyn_proto_apply_fn ( cudyn_proto_t  proto,
cu_fnptr_t  fn,
cuex_t arg_arr 
)

Apply fn to arguments in arg_arr, assuming that fn has prototype proto, and wrap the result in a dynamic type capsule.

cuoo_type_t cudyn_proto_arg_type_at ( cudyn_proto_t  proto,
cu_rank_t  i 
)

The type of argument number i of proto.

cudyn_proto_t cudyn_proto_by_tuptype ( cudyn_tuptype_t  arg_type,
cuoo_type_t  res_type 
)

Return the prototype for arg_typeres_type

cudyn_proto_t cudyn_proto_from_type ( cuoo_type_t  t  ) 

Cast from base struct.

size_t cudyn_proto_r ( cudyn_proto_t  proto  ) 

Return the arity of proto.

cuoo_type_t cudyn_proto_res_type ( cudyn_proto_t  proto  ) 

The result type part of proto.

cuoo_type_t cudyn_proto_to_type ( cudyn_proto_t  proto  ) 

Cast to base struct.

cuoo_type_t cudyn_proto_type (  ) 

The type of all prototypes.

Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.