7.5. More types

This section lists various types that are used by the runtime library.

7.5.1. struct name


struct name
{
  char *s;
  int len;
};

The s points to the zero-terminated C byte-string holding the name. The len is the length of s.

7.5.2. trt_selector_args


struct trt_selector_args
{
  int num;

  enum trt_type_encoding args[0];
};

A trt_selector_args describes the arguments to or return value from a method. In this context, all values are de-tupled and concatenated. Thus, a selector accepting an int and a float has the same argument description as a selector accepting a tuple (int, float). For the arguments, this excludes the implicit two first arguments, self and cmd.

num

The number of entries in args.

args

The description for each flat argument.

7.5.3. enum trt_type_encoding


enum trt_type_encoding
{
  TRT_TE_VOID,
  TRT_TE_BOOLEAN,
  TRT_TE_BYTE,
  TRT_TE_CHAR,
  TRT_TE_INT,
  TRT_TE_LONG,
  TRT_TE_FLOAT,
  TRT_TE_DOUBLE,
  TRT_TE_POINTER,
  TRT_TE_SELECTOR,
  TRT_TE_REFERENCE,
  TRT_TE_DYNAMIC,
};

The trt_type_encoding is used in the definition of argument and return types of selectors.